#ifndef BOOST_QVM_SCALAR_TRAITS_HPP_INCLUDED #define BOOST_QVM_SCALAR_TRAITS_HPP_INCLUDED /// Copyright (c) 2008-2021 Emil Dotchevski and Reverge Studios, Inc. /// Distributed under the Boost Software License, Version 1.0. (See accompanying /// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include namespace boost { namespace qvm { template struct scalar_traits { static BOOST_QVM_INLINE_CRITICAL Scalar value( int v ) { return Scalar(v); } }; template struct is_scalar { static bool const value=false; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; template <> struct is_scalar { static bool const value=true; }; namespace qvm_detail { template ::value, bool IsV=is_vec::value, bool IsM=is_mat::value, bool IsS=is_scalar::value> struct scalar_impl { typedef void type; }; template struct scalar_impl { typedef A type; }; template struct scalar_impl { typedef typename mat_traits::scalar_type type; }; template struct scalar_impl { typedef typename vec_traits::scalar_type type; }; template struct scalar_impl { typedef typename quat_traits::scalar_type type; }; } template struct scalar { typedef typename qvm_detail::scalar_impl::type type; }; } } #endif