This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52521] New: [C++11] user defined literals and order of declaration


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]