//Copyright (c) 2008-2016 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) #ifdef BOOST_QVM_TEST_SINGLE_HEADER # include BOOST_QVM_TEST_SINGLE_HEADER #else # include #endif template struct same_type; template struct same_type { }; template struct check { same_type::type,Result> a; same_type::type,Result> b; }; template struct v1; template struct v2; namespace boost { namespace qvm { template struct vec_traits< v1 > { typedef T scalar_type; static int const dim=D; }; template struct vec_traits< v2 > { typedef T scalar_type; static int const dim=D; }; template struct deduce_vec,D,S> { typedef v2 type; }; template struct deduce_vec2,v2,D,S> { typedef v2 type; }; } } int main() { same_type< boost::qvm::deduce_vec< v1 >::type, v1 >(); same_type< boost::qvm::deduce_vec< v1, 4 >::type, boost::qvm::vec >(); check< v1, v1, 3, v1 >(); check< v1, v1, 4, boost::qvm::vec >(); same_type< boost::qvm::deduce_vec< v2 >::type, v2 >(); same_type< boost::qvm::deduce_vec< v2, 4 >::type, v2 >(); check< v2, v2, 3, v2 >(); check< v2, v2, 4, v2 >(); }