| 1 | #ifndef BOOST_QVM_IS_SCALAR_HPP_INCLUDED |
| 2 | #define BOOST_QVM_IS_SCALAR_HPP_INCLUDED |
| 3 | |
| 4 | // Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc. |
| 5 | |
| 6 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 7 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 8 | |
| 9 | namespace boost { namespace qvm { |
| 10 | |
| 11 | template <class T> |
| 12 | struct |
| 13 | is_scalar |
| 14 | { |
| 15 | static bool const value=false; |
| 16 | }; |
| 17 | template <class T> |
| 18 | struct |
| 19 | is_scalar<T const>: |
| 20 | is_scalar<T> |
| 21 | { |
| 22 | }; |
| 23 | template <> struct is_scalar<signed char> { static bool const value=true; }; |
| 24 | template <> struct is_scalar<unsigned char> { static bool const value=true; }; |
| 25 | template <> struct is_scalar<signed short> { static bool const value=true; }; |
| 26 | template <> struct is_scalar<unsigned short> { static bool const value=true; }; |
| 27 | template <> struct is_scalar<signed int> { static bool const value=true; }; |
| 28 | template <> struct is_scalar<unsigned int> { static bool const value=true; }; |
| 29 | template <> struct is_scalar<signed long> { static bool const value=true; }; |
| 30 | template <> struct is_scalar<unsigned long> { static bool const value=true; }; |
| 31 | template <> struct is_scalar<signed long long> { static bool const value=true; }; |
| 32 | template <> struct is_scalar<unsigned long long> { static bool const value=true; }; |
| 33 | template <> struct is_scalar<float> { static bool const value=true; }; |
| 34 | template <> struct is_scalar<double> { static bool const value=true; }; |
| 35 | template <> struct is_scalar<long double> { static bool const value=true; }; |
| 36 | } } |
| 37 | |
| 38 | #endif |
| 39 | |