[Bug c++/50967] New: [C++0x] Literal operators are not found by using-declarations
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 19:00:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50967
Bug #: 50967
Summary: [C++0x] Literal operators are not found by
using-declarations
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
CC: 3dw4rd@verizon.net
gcc 4.7.0 20111029 (experimental) in C++0x mode rejects the following code:
//---
namespace n {
int operator "" _xx(const char*);
}
using n::_xx;
//---
The error message is:
"'n::_xx' has not been declared"
The code should be accepted.
According to 13.5.8 p2: "A declaration whose declarator-id is a
literal-operator-id shall be a declaration of a namespace-scope function or
function template [..] or a using-declaration (7.3.3)."
A using directives can be used as a workaround, though.
More information about the Gcc-bugs
mailing list