+struct CheckFormattedOutput: Sfinae
+{
+ static std::ostream &s;
+ template<typename T>
+ static Yes f(int (*)[sizeof(s<<reinterpret_cast<const T &>(s))]);
+ using Sfinae::f;
+};
+
+struct CheckFormattedInput: Sfinae
+{
+ static std::istream &s;
+ template<typename T>
+ static Yes f(int (*)[sizeof(s>>reinterpret_cast<T &>(s))]);
+ using Sfinae::f;
+};
+
+template<typename T> struct HasFormattedOutput: Sfinae::Evaluate<CheckFormattedOutput, T> { };
+template<typename T> struct HasFormattedInput: Sfinae::Evaluate<CheckFormattedInput, T> { };
+
+