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

             Bug #: 51107
           Summary: [C++11] Accepts invalid literal operator with void
                    argument list.
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: 3dw...@verizon.net


Created attachment 25809
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25809
Test case that should fail every which way.

I found that a non-template literal operator with no arguments is accepted by
g++.

#include <cassert>

//  This argument list should not be allowed but is.
int
operator"" _foo()
{ return 66; }

int
main()
{
  assert(operator"" _foo() == 66);  //  This is bad!
}

Reply via email to