public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ianmcc at physik dot rwth-aachen dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/24298] New: Libstdc++ uses anonymous enums, causing failures due to DR488 Date: Mon, 10 Oct 2005 16:28:00 -0000 [thread overview] Message-ID: <bug-24298-11498@http.gcc.gnu.org/bugzilla/> (raw) g++ -c the attached sample fails with /usr/include/g++/bits/stl_algo.h: In function `void std::__final_insertion_sort(_RandomAccessIter, _RandomAccessIter) [with _RandomAccessIter = __gnu_cxx::__normal_iterator<foo*, std::vector<foo, std::allocator<foo> > >]': /usr/include/g++/bits/stl_algo.h:2181: instantiated from `void std::sort(_RandomAccessIter, _RandomAccessIter) [with _RandomAccessIter = __gnu_cxx::__normal_iterator<foo*, std::vector<foo, std::allocator<foo> > >]' testenum.cpp:21: instantiated from here /usr/include/g++/bits/stl_algo.h:2059: error: template-argument ` std::<anonymous enum>' uses anonymous type /usr/include/g++/bits/stl_algo.h:2181: instantiated from `void std::sort(_RandomAccessIter, _RandomAccessIter) [with _RandomAccessIter = __gnu_cxx::__normal_iterator<foo*, std::vector<foo, std::allocator<foo> > >]' testenum.cpp:21: instantiated from here /usr/include/g++/bits/stl_algo.h:2060: error: template-argument ` std::<anonymous enum>' uses anonymous type The problem: std::sort (and other components of libstdc++) use anonymmous enumerations for private constants. However if there is a template operator/function in an associated namespace that uses SFINAE, it will fail according to 14.3.1/2. The resolution of DR-488 will surely fix this, presumably by making the substitution fail (without error), but irrespective of this DR, I cannot find anything in the standard that suggests that the attached code is non-conforming. -- Summary: Libstdc++ uses anonymous enums, causing failures due to DR488 Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ianmcc at physik dot rwth-aachen dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24298
next reply other threads:[~2005-10-10 16:28 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-10-10 16:28 ianmcc at physik dot rwth-aachen dot de [this message] 2005-10-10 16:29 ` [Bug libstdc++/24298] " ianmcc at physik dot rwth-aachen dot de 2005-10-10 16:36 ` ianmcc at physik dot rwth-aachen dot de 2005-10-10 16:39 ` pinskia at gcc dot gnu dot org 2005-10-10 16:44 ` pinskia at gcc dot gnu dot org 2005-10-10 16:50 ` ianmcc at physik dot rwth-aachen dot de 2005-10-10 17:09 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-24298-11498@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).