26 #ifndef EIGEN_RETURNBYVALUE_H
27 #define EIGEN_RETURNBYVALUE_H
38 template<
typename Derived>
39 struct traits<ReturnByValue<Derived> >
40 :
public traits<typename traits<Derived>::ReturnType>
57 template<
typename Derived,
int n,
typename PlainObject>
58 struct nested<ReturnByValue<Derived>, n, PlainObject>
66 :
public internal::dense_xpr_base< ReturnByValue<Derived> >::type
69 typedef typename internal::traits<Derived>::ReturnType
ReturnType;
71 typedef typename internal::dense_xpr_base<ReturnByValue>::type
Base;
74 template<typename Dest>
75 inline
void evalTo(Dest& dst)
const
76 {
static_cast<const Derived*
>(
this)->
evalTo(dst); }
77 inline Index
rows()
const {
return static_cast<const Derived*
>(
this)->
rows(); }
78 inline Index
cols()
const {
return static_cast<const Derived*
>(
this)->
cols(); }
80 #ifndef EIGEN_PARSED_BY_DOXYGEN
81 #define Unusable YOU_ARE_TRYING_TO_ACCESS_A_SINGLE_COEFFICIENT_IN_A_SPECIAL_EXPRESSION_WHERE_THAT_IS_NOT_ALLOWED_BECAUSE_THAT_WOULD_BE_INEFFICIENT
83 Unusable(
const Unusable&) {}
84 Unusable& operator=(
const Unusable&) {
return *
this;}
86 const Unusable& coeff(Index)
const {
return *
reinterpret_cast<const Unusable*
>(
this); }
87 const Unusable& coeff(Index,Index)
const {
return *
reinterpret_cast<const Unusable*
>(
this); }
88 Unusable& coeffRef(Index) {
return *
reinterpret_cast<Unusable*
>(
this); }
89 Unusable& coeffRef(Index,Index) {
return *
reinterpret_cast<Unusable*
>(
this); }
93 template<
typename Derived>
94 template<
typename OtherDerived>
103 #endif // EIGEN_RETURNBYVALUE_H