// PR c++/56208 // { dg-do compile { target c++11 } } struct ostream { ostream& operator<<(int); }; struct sfinae_base { typedef char one; typedef char (&two)[2]; template static T make(); template struct ok { typedef int type; }; template static one test(decltype((make() << make()), 0)); template static two test(...); }; template struct is_printable : private sfinae_base { enum { value = sizeof(test(0)) == sizeof(one) }; }; typedef int ok[is_printable::value ? 1 : -1];