ntg::internal::operator_traits< Op, T, U > Struct Template Reference

Give return type for operators, depending on the input types. More...

#include <global_ops_traits.hh>

Inheritance diagram for ntg::internal::operator_traits< Op, T, U >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef undefined_traits ret
typedef undefined_traits impl
enum  { commutative = false }

Detailed Description

template<class Op, class T, class U>
struct ntg::internal::operator_traits< Op, T, U >

Give return type for operators, depending on the input types.

operator_traits traits should not be used directly. Instead one should use deduce_from_traits, see comments below for more details.

These traits defines 3 properties:

commutative (enum): Tells whether the operator is commutative or not.

ret (typedef): Specifies the return type.

impl (typedef): Specifies the type which implement the operator, that is, the type T such as optraits<T>::operatorX is the good implementation.

To specify the concerned operator, one empty class represent each operator. For example, to specify the traits associated to the + operator with T1 and T2 as arguments:

template <class T1, class T2> struct operator_traits<operator_plus, T1, T2> { ... }

Definition at line 128 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 doxygen 1.3.6-20040222