[Bug c++/16934] template-in-the-template explicit specialization, problem with inlined

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Tue Aug 10 15:25:00 GMT 2004


------- Additional Comments From giovannibajo at libero dot it  2004-08-10 15:25 -------
(In reply to comment #2)

> Nice, but there are not solution for gcc 3.4.1 for such code 
> (no way to declare specialization): 

I can think of a dozen of workarounds, even without moving the nested class 
into the global scope:
  
struct X_BASE
{ 
   template<typename T> 
   struct Y 
   { 
      typedef char type; 
   }; 
}; 
  
template<>            
struct X::Y<int> 
{ 
   typedef int type; 
}; 
 
struct X : X_BASE {
   typedef Y<int>::type type; 
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16934



More information about the Gcc-bugs mailing list