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: [email protected]
ReportedBy: [email protected]
#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.