udlit-member-neg.C 408 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
// { dg-options -std=c++0x }

class Foo
{
public:
  Foo() { }
  int operator"" _Bar(char32_t);  // { dg-error "must be a non-member function" }
};

int i = operator"" _Bar(U'x');  // { dg-error "was not declared in this scope" }
jason's avatar
jason committed
11
int j = U'x'_Bar;  // { dg-error "unable to find character literal operator" }
12 13 14 15

int
Foo::operator"" _Bar(char32_t)  // { dg-error "must be a non-member function" }
{ return 42; }