This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20589] error: '<anonymous enum>' is/uses anonymous type'
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2005 19:28:50 -0000
- Subject: [Bug c++/20589] error: '<anonymous enum>' is/uses anonymous type'
- References: <20050322154540.20589.caolanm@redhat.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20589