11#ifndef NDARRAY_ExpressionTraits_h_INCLUDED
12#define NDARRAY_ExpressionTraits_h_INCLUDED
21#include <boost/static_assert.hpp>
31 typedef boost::mpl::true_ IsScalar;
41template <
typename Operand,
typename UnaryFunction,
int N>
43 typedef typename UnaryFunction::result_type Element;
50 typedef boost::mpl::false_ IsScalar;
58template <
typename Operand,
typename UnaryFunction>
60 typedef typename UnaryFunction::result_type Element;
63 typedef typename boost::remove_const<Element>::type Value;
64 typedef Value
const Reference;
65 typedef boost::mpl::false_ IsScalar;
73template <
typename Operand1,
typename Operand2,
typename BinaryFunction,
int N>
74struct ExpressionTraits< detail::BinaryOpExpression<Operand1,Operand2,BinaryFunction,N> > {
75 typedef typename BinaryFunction::result_type Element;
83 typedef boost::mpl::false_ IsScalar;
92template <
typename Operand1,
typename Operand2,
typename BinaryFunction>
93struct ExpressionTraits< detail::BinaryOpExpression<Operand1,Operand2,BinaryFunction,1> > {
94 typedef typename BinaryFunction::result_type Element;
97 typedef typename boost::remove_const<Element>::type Value;
98 typedef Value
const Reference;
99 typedef boost::mpl::false_ IsScalar;
Forward declarations and default template parameters for ndarray.
Traits for expressions.
Definition ExpressionTraits.h:30