diff --git a/dlib/algs.h b/dlib/algs.h index 4a5866d7f..0a4200297 100644 --- a/dlib/algs.h +++ b/dlib/algs.h @@ -431,6 +431,19 @@ namespace dlib is_same_type(); }; +// ---------------------------------------------------------------------------------------- + + /*!A is_float_type + + This is a template that can be used to determine if a type is one of the built + int floating point types (i.e. float, double, or long double). + !*/ + + template < typename T > struct is_float_type { const static bool value = false; }; + template <> struct is_float_type { const static bool value = true; }; + template <> struct is_float_type { const static bool value = true; }; + template <> struct is_float_type { const static bool value = true; }; + // ---------------------------------------------------------------------------------------- /*!A is_convertible