------- Additional Comments From bangerth at dealii dot org  2005-03-23 18:53 
-------
Intuitively, C++ treats unnamed enums differently than named ones, because 
in templates the function/class name has to be mangled, and will contain 
the name of the template arguments. If the template argument doesn't have 
a name, then the compiler can't do its job, so the standard chose to 
disallow unnamed enums as template arguments. 
 
For more legalese, this is specified in section 14.3.1/2 of the standard, 
which says: 
 
2 A  local  type,  a  type  with  no  linkage, an unnamed type or a type 
  compounded from any of these types shall not be used  as  a  template- 
  argument for a template type-parameter.  [Example: ... 
 
Regards 
  Wolfgang 
 

-- 


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

Reply via email to