cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Correct or Not
Correct or Not
Jul 14, 2013 at 7:38am UTC
Sarmadas
(90)
is this code is correct or not and why it's correct or not i'm confused help please
1
2
3
4
5
6
7
8
template
<
class
T>
class
A { } ;
template
<
class
T >
class
B :
public
A< T* > { … }
Jul 14, 2013 at 7:44am UTC
Lachlan Easton
(699)
What do you mean by correct? As far as I can tell it looks like legal C++ (besides the missing semicolon after the last
}
It declares a template class 'A<T>', then declares another template class 'B<T>' that publicly derives from 'A<T*>'
Jul 14, 2013 at 7:51am UTC
Sarmadas
(90)
Is this some kind of partially specialized class if it's then please explain i'm confused
Jul 14, 2013 at 9:44am UTC
Peter87
(11234)
No, this is not template specialization at all.
Topic archived. No new replies allowed.