This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52618] Explicit template specialization ignores access rights


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]