1// { dg-do run { target c++11 } } 2 3#include <cstdint> 4#include <cassert> 5 6int operator"" _foo(const char*) { return 0; } 7int operator"" _foo(unsigned long long int) { return 1; } 8int operator"" _foo(long double) { return 2; } 9int operator"" _foo(char) { return 3; } 10int operator"" _foo(wchar_t) { return 4; } 11int operator"" _foo(char16_t) { return 5; } 12int operator"" _foo(char32_t) { return 6; } 13int operator"" _foo(const char*, std::size_t) { return 7; } 14int operator"" _foo(const wchar_t*, std::size_t) { return 8; } 15int operator"" _foo(const char16_t*, std::size_t) { return 9; } 16int operator"" _foo(const char32_t*, std::size_t) { return 10; } 17template<char...> int operator"" _foo2() { return 20; } 18int operator"" _foo2(unsigned long long int) { return 21; } 19 20int 21main() 22{ 23 assert(123_foo == 1); 24 assert(0.123_foo == 2); 25 assert('c'_foo == 3); 26 assert(L'c'_foo == 4); 27 assert(u'c'_foo == 5); 28 assert(U'c'_foo == 6); 29 assert("abc"_foo == 7); 30 assert(L"abc"_foo == 8); 31 assert(u"abc"_foo == 9); 32 assert(U"abc"_foo == 10); 33 assert(123_foo2 == 21); 34} 35