public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52521] New: [C++11] user defined literals and order of declaration
@ 2012-03-07 14:00 marc.glisse at normalesup dot org
  2012-03-07 14:59 ` [Bug c++/52521] " jakub at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: marc.glisse at normalesup dot org @ 2012-03-07 14:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52521
           Summary: [C++11] user defined literals and order of declaration
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


#include <cstdlib>
int operator "" _w(const char*);
int operator "" _w(const char*, std::size_t);
int main() {
  123_w;
}

a.cc: In function 'int main()':
a.cc:5:3: error: unable to find numeric literal operator 'operator"" _w'

The problem disappears if I switch the 2 declarations...

Btw, mangling these operators like functions called li_w taking the same
arguments is strange, I could have such a function in my code.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-03-22 10:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-07 14:00 [Bug c++/52521] New: [C++11] user defined literals and order of declaration marc.glisse at normalesup dot org
2012-03-07 14:59 ` [Bug c++/52521] " jakub at gcc dot gnu.org
2012-03-07 20:10 ` jason at gcc dot gnu.org
2012-03-07 20:17 ` jason at gcc dot gnu.org
2012-03-07 20:20 ` jason at gcc dot gnu.org
2012-03-09 21:21 ` jakub at gcc dot gnu.org
2012-03-14  8:48 ` jakub at gcc dot gnu.org
2012-03-16 19:29 ` andy at aligature dot com
2012-03-16 20:08 ` marc.glisse at normalesup dot org
2012-03-16 20:18 ` andy at aligature dot com
2012-03-16 20:53 ` jakub at gcc dot gnu.org
2012-03-16 21:04 ` jakub at gcc dot gnu.org
2012-03-22  8:31 ` rguenth at gcc dot gnu.org
2012-03-22  9:56 ` marc.glisse at normalesup dot org
2012-03-22 10:15 ` jakub at gcc dot gnu.org
2012-03-22 10:20 ` jakub at gcc dot gnu.org

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).