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: unassig...@gcc.gnu.org
        ReportedBy: daniel.krueg...@googlemail.com
                CC: 3dw...@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.

Reply via email to