* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae43.C
blob14c31f681770e80343522f6791522ac11468dac8
1 // PR c++/56208
2 // { dg-do compile { target c++11 } }
4 struct ostream {
5   ostream& operator<<(int);
6 };
8 struct sfinae_base {
10   typedef char one;
11   typedef char (&two)[2];
13   template<class T>
14   static T make();
16   template<unsigned> struct ok { typedef int type; };
18   template<class U, class T>
19   static one test(decltype((make<U>() << make<T>()), 0));
21   template<class, class>
22   static two test(...);
25 template<class T>
26 struct is_printable : private sfinae_base
28   enum { value = sizeof(test<ostream&, T>(0)) == sizeof(one) };
31 typedef int ok[is_printable<int>::value ? 1 : -1];