+struct HasFormattedOutput: Sfinae
+{
+ static std::ostream &s;
+ static T &v;
+
+ /* The expression must depend on the template parameter, or the compiler
+ will give an error. */
+ template<typename U>
+ static Yes f(int (*)[sizeof(s<<HasFormattedOutput<U>::v)]);
+ template<typename U>
+ static No f(...);
+
+ enum { value = Evaluate<sizeof(f<T>(0))>::value };
+};
+
+template<typename T>
+struct HasFormattedInput: Sfinae
+{
+ static std::istream &s;
+ static T &v;
+
+ template<typename U>
+ static Yes f(int (*)[sizeof(s>>HasFormattedOutput<U>::v)]);
+ template<typename U>
+ static No f(...);
+
+ enum { value = Evaluate<sizeof(f<T>(0))>::value };
+};
+
+
+template<typename T>
+typename EnableIf<HasFormattedOutput<T>::value, void>::Yes
+operator<<(LexicalConverter &c, const T &v)