1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2
3using size_t = decltype(sizeof(int));
4
5template<typename T, typename U> struct same_type;
6template<typename T> struct same_type<T, T> {};
7template<typename T> using X = T;
8template<typename CharT, X<CharT>...>
9int operator "" _x(); // expected-warning {{string literal operator templates are a GNU extension}}
10template<char...>
11double operator "" _x();
12
13auto a="string"_x;
14auto b=42_x;
15same_type<decltype(a), int> test_a;
16same_type<decltype(b), double> test_b;
17
18char operator "" _x(const char *begin, size_t size);
19auto c="string"_x;
20auto d=L"string"_x;
21same_type<decltype(c), char> test_c;
22same_type<decltype(d), int> test_d;
23