$ /ltmp/bin/g++ -v Using built-in specs. COLLECT_GCC=/ltmp/bin/g++ COLLECT_LTO_WRAPPER=/ltmp/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ./configure --prefix=/ltmp --with-gimp=/ltmp --with-mpfr=/ltmp --with-mpc=/ltmp Thread model: posix gcc version 4.6.0 20100720 (experimental) (GCC) $ /ltmp/bin/g++ -save-temps test.cc $ cat test.ii # 1 "test.cc" # 1 "<built-in>" # 1 "<command-line>" # 1 "test.cc" class C { private: typedef int Private; };
template<typename T> void function(typename T::Private); template<> void function<C>(int parameter) { } int main() { function<C>(0); } $ -- Summary: template function specialization: does not respect access specifier Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: eisenstatdavid+gcc at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45011