]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/lexicalcast.h
Deprecate various meta-programming constructs in favor of std ones
[libs/core.git] / source / strings / lexicalcast.h
index 6fe3cb366b24015ea215c127913db9f43ac42276..4f54a8515df8e2806cc118e0a4d982b88ff0a5c2 100644 (file)
@@ -97,7 +97,7 @@ struct CheckFormattedOutput: Sfinae
 {
        static std::ostream &s;
        template<typename T>
-       static Yes f(int (*)[sizeof(s<<T())]);
+       static Yes f(int (*)[sizeof(s<<reinterpret_cast<const T &>(s))]);
        using Sfinae::f;
 };
 
@@ -114,7 +114,7 @@ template<typename T> struct HasFormattedInput: Sfinae::Evaluate<CheckFormattedIn
 
 
 template<typename T>
-typename EnableIf<HasFormattedOutput<T>::value, void>::Yes
+typename std::enable_if<HasFormattedOutput<T>::value>::type
 operator<<(LexicalConverter &c, const T &v)
 {
        std::ostringstream ss;
@@ -123,7 +123,7 @@ operator<<(LexicalConverter &c, const T &v)
 }
 
 template<typename T>
-typename EnableIf<HasFormattedInput<T>::value, void>::Yes
+typename std::enable_if<HasFormattedInput<T>::value>::type
 operator>>(const LexicalConverter &c, T &v)
 {
        std::istringstream ss(c.get());