* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae49.C
blob59381f341b45e2a6d2a3d5cd503a785a3bc85db0
1 // PR c++/58932
2 // { dg-do compile { target c++11 } }
4 using nullptr_t = decltype(nullptr);
6 template<typename T, typename Sfinae = nullptr_t>
7 struct B {
8     static float& int_if_addable();
9 };
11 template<typename T>
12 struct B<T, decltype( (T() + T()), nullptr )> {
13     static int& int_if_addable();
16 struct X { };
18 struct Y { };
19 Y operator+(Y, Y);
21 struct Z { };
22 Z operator+(Z, Z) = delete;
24 int main()
26   float& a = B<X>::int_if_addable();
27   int& b = B<Y>::int_if_addable();
28   float& c = B<Z>::int_if_addable();