quaternion_traits.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00013 #ifndef quaternion_traits_h
00014 #define quaternion_traits_h
00015
00016 #include <cml/et/traits.h>
00017
00018 namespace cml {
00019 namespace et {
00020
00022 template<typename E, class AT, class OT, class CT>
00023 struct ExprTraits< cml::quaternion<E,AT,OT,CT> >
00024 {
00025 typedef typename cml::quaternion<E,AT,OT,CT>::expr_type expr_type;
00026 typedef typename expr_type::value_type value_type;
00027 typedef typename expr_type::expr_reference reference;
00028 typedef typename expr_type::expr_const_reference const_reference;
00029 typedef typename expr_type::result_tag result_tag;
00030 typedef typename expr_type::size_tag size_tag;
00031 typedef typename expr_type::assignable_tag assignable_tag;
00032 typedef expr_type result_type;
00033 typedef expr_leaf_tag node_tag;
00034
00035 value_type get(const expr_type& v, size_t i) const { return v[i]; }
00036 size_t size(const expr_type& v) const { return 4; }
00037 };
00038
00039 }
00040 }
00041
00042 #endif
00043
00044
00045