diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index a898b542..24d1b3b4 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -59,73 +59,99 @@ namespace detail static const char* True = "true"; static const char* False = "false"; + template + struct literal + { + GLM_FUNC_QUALIFIER static char const * value() {return "%d";}; + }; + + template + struct literal + { + GLM_FUNC_QUALIFIER static char const * value() {return "%f";}; + }; + +# if GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC + template <> + struct literal + { + GLM_FUNC_QUALIFIER static char const * value() {return "%lld";}; + }; + + template <> + struct literal + { + GLM_FUNC_QUALIFIER static char const * value() {return "%lld";}; + }; +# endif//GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC + template struct prefix{}; template <> struct prefix { - static char const * value() {return "";}; + GLM_FUNC_QUALIFIER static char const * value() {return "";}; }; template <> struct prefix { - static char const * value() {return "d";}; + GLM_FUNC_QUALIFIER static char const * value() {return "d";}; }; template <> struct prefix { - static char const * value() {return "b";}; + GLM_FUNC_QUALIFIER static char const * value() {return "b";}; }; template <> struct prefix { - static char const * value() {return "u8";}; + GLM_FUNC_QUALIFIER static char const * value() {return "u8";}; }; template <> struct prefix { - static char const * value() {return "i8";}; + GLM_FUNC_QUALIFIER static char const * value() {return "i8";}; }; template <> struct prefix { - static char const * value() {return "u16";}; + GLM_FUNC_QUALIFIER static char const * value() {return "u16";}; }; template <> struct prefix { - static char const * value() {return "i16";}; + GLM_FUNC_QUALIFIER static char const * value() {return "i16";}; }; template <> struct prefix { - static char const * value() {return "u";}; + GLM_FUNC_QUALIFIER static char const * value() {return "u";}; }; template <> struct prefix { - static char const * value() {return "i";}; + GLM_FUNC_QUALIFIER static char const * value() {return "i";}; }; template <> struct prefix { - static char const * value() {return "u64";}; + GLM_FUNC_QUALIFIER static char const * value() {return "u64";}; }; template <> struct prefix { - static char const * value() {return "i64";}; + GLM_FUNC_QUALIFIER static char const * value() {return "i64";}; }; template