#ifndef BOOST_QVM_DEDUCE_VEC_HPP_INCLUDED #define BOOST_QVM_DEDUCE_VEC_HPP_INCLUDED // Copyright 2008-2022 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 namespace boost { namespace qvm { template struct vec; namespace qvm_detail { template ::dim, class VS=typename vec_traits::scalar_type> struct deduce_v_default { BOOST_QVM_STATIC_ASSERT(is_vec::value); typedef vec::scalar_type,D> type; }; template struct deduce_v_default { BOOST_QVM_STATIC_ASSERT(is_vec::value); typedef V type; }; } template ::dim,class S=typename vec_traits::scalar_type> struct deduce_vec { BOOST_QVM_STATIC_ASSERT(is_vec::value); typedef typename qvm_detail::deduce_v_default::type type; }; namespace qvm_detail { template ::value, bool IsScalarB=is_scalar::value> struct deduce_v2_default { typedef vec type; }; template struct deduce_v2_default { BOOST_QVM_STATIC_ASSERT(is_vec::value); typedef V type; }; template struct deduce_v2_default { BOOST_QVM_STATIC_ASSERT(is_vec::value); typedef typename deduce_vec::type type; }; template struct deduce_v2_default { BOOST_QVM_STATIC_ASSERT(is_vec::value); typedef typename deduce_vec::type type; }; } template ::type,typename scalar::type>::type> struct deduce_vec2 { BOOST_QVM_STATIC_ASSERT(is_vec::value || is_vec::value); typedef typename qvm_detail::deduce_v2_default::type type; }; } } #endif