From 620861973ef496233c6a539c1147a1e1bf14537c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 13 Oct 2011 18:42:45 +0100 Subject: [PATCH] Added float_or_int_trait --- glm/core/_detail.hpp | 86 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index e6d2e128..6300ebbe 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -345,8 +345,92 @@ namespace detail typedef float float32; typedef double float64; -}//namespace detail + ////////////////// + // float_or_int_trait + struct float_or_int_value + { + enum + { + ERROR, + FLOAT, + INT + }; + }; + + template + struct float_or_int_trait + { + enum{ID = float_or_int_value::ERROR}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::FLOAT}; + }; + +}//namespace detail }//namespace glm #if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))