[Bug c++/20589] error: '<anonymous enum>' is/uses anonymous type'

mark at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 23 19:28:00 GMT 2005

------- Additional Comments From mark at codesourcery dot com  2005-03-23 19:28 -------
Subject: Re:  error: '<anonymous enum>' is/uses anonymous type'

bangerth at dealii dot org wrote:
> ------- Additional Comments From bangerth at dealii dot org  2005-03-23 19:24 -------
> That has been subject to discussion (i.e. whether the attempt to use an 
> unnamed enum as a template argument should just silently fail as a  
> substitution failure). However, it has been decided that this is a hard 
> error, not only a substitution failure. 
> I am presently not quite sure about the reasoning, and I believe that there 
> was a DR or something still pending. Mark, do you remember the details? I 
> think this came up in a different PR before... 

It's swapped out of my brain, but there was another PR, and I did raise 
the issue for Steve Adamczyk, to be added to the core issue list.  The 
basic point is that the SFINAE rules simply do not cover this case; they 
precisely describe a set of situations in which no error should be 
issued, and trying to use an anonymous type as a template parameter is 
not among them.



More information about the Gcc-bugs mailing list