ntg::internal::deduce_from_traits< Op, T, U > Struct Template Reference
Find the good operator_traits, following a simple algorithm.
More...
#include <global_ops_traits.hh>
List of all members.
|
Public Types |
typedef operator_traits< Op,
traits_lhs_type, traits_rhs_type > | deduced_traits |
typedef deduced_type::lhs_type | lhs_type |
typedef deduced_type::rhs_type | rhs_type |
typedef deduced_traits::ret | ret |
typedef deduced_traits::impl | impl |
Detailed Description
template<class Op, class T, class U>
struct ntg::internal::deduce_from_traits< Op, T, U >
Find the good operator_traits, following a simple algorithm.
deduce_from_traits should generally be used instead of operator_traits. Indeed, it has a handy algorithm to find return types:
1) Convert T1 and T2 to ntg types. 2) Check if traits<T1, T2> is defined. 3) Else, check if traits<T2, T1> is defined AND traits<T2, T1>::commutative is true.
deduce_from_traits defines several types:
- lhs_type and rhs_type: The types into which the first and second paramaters should be converted before called the implementation.
- impl: The implementation type.
- deduced_traits: A pointer to the good operator_traits<> specialization. This can be useful sometimes.
Definition at line 174 of file global_ops_traits.hh.
The documentation for this struct was generated from the following file:
Generated on Thu Apr 15 20:13:49 2004 for Olena by
1.3.6-20040222