[Bug c++/52618] Explicit template specialization ignores access rights
blobbyvolley at mailmetrash dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 20 12:10:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52618
--- Comment #2 from blobbyvolley at mailmetrash dot com 2012-03-20 11:53:29 UTC ---
If it can be of any help, I noticed that for partial specializations everything
works as intended (the compiler reports an error).
class B {
typedef double type; // this is a private member
};
template<class T, class U> struct get_type;
template<class U> struct get_type<B, U> { // partial specialization
typedef typename B::type type; // error here
};
typedef typename get_type<B, int>::type sometype;
More information about the Gcc-bugs
mailing list