11 #ifndef EIGEN_RETURNBYVALUE_H
12 #define EIGEN_RETURNBYVALUE_H
23 template<
typename Derived>
24 struct traits<ReturnByValue<Derived> >
25 :
public traits<typename traits<Derived>::ReturnType>
31 Flags = (traits<typename traits<Derived>::ReturnType>::Flags
42 template<
typename Derived,
int n,
typename PlainObject>
43 struct nested<ReturnByValue<Derived>, n, PlainObject>
45 typedef typename traits<Derived>::ReturnType type;
50 template<
typename Derived>
class ReturnByValue
51 : internal::no_assignment_operator,
public internal::dense_xpr_base< ReturnByValue<Derived> >::type
54 typedef typename internal::traits<Derived>::ReturnType ReturnType;
56 typedef typename internal::dense_xpr_base<ReturnByValue>::type Base;
57 EIGEN_DENSE_PUBLIC_INTERFACE(ReturnByValue)
59 template<typename Dest>
60 inline
void evalTo(Dest& dst)
const
61 {
static_cast<const Derived*
>(
this)->evalTo(dst); }
62 inline Index rows()
const {
return static_cast<const Derived*
>(
this)->rows(); }
63 inline Index cols()
const {
return static_cast<const Derived*
>(
this)->cols(); }
65 #ifndef EIGEN_PARSED_BY_DOXYGEN
66 #define Unusable YOU_ARE_TRYING_TO_ACCESS_A_SINGLE_COEFFICIENT_IN_A_SPECIAL_EXPRESSION_WHERE_THAT_IS_NOT_ALLOWED_BECAUSE_THAT_WOULD_BE_INEFFICIENT
68 Unusable(
const Unusable&) {}
69 Unusable& operator=(
const Unusable&) {
return *
this;}
71 const Unusable& coeff(Index)
const {
return *
reinterpret_cast<const Unusable*
>(
this); }
72 const Unusable& coeff(Index,Index)
const {
return *
reinterpret_cast<const Unusable*
>(
this); }
73 Unusable& coeffRef(Index) {
return *
reinterpret_cast<Unusable*
>(
this); }
74 Unusable& coeffRef(Index,Index) {
return *
reinterpret_cast<Unusable*
>(
this); }
75 template<
int LoadMode> Unusable& packet(Index)
const;
76 template<
int LoadMode> Unusable& packet(Index, Index)
const;
80 template<
typename Derived>
81 template<
typename OtherDerived>
84 other.evalTo(derived());
88 template<
typename Derived>
89 template<
typename OtherDerived>
90 Derived& DenseBase<Derived>::lazyAssign(
const ReturnByValue<OtherDerived>& other)
92 other.evalTo(derived());
99 #endif // EIGEN_RETURNBYVALUE_H
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:58
Derived & operator=(const DenseBase< OtherDerived > &other)
Definition: Assign.h:550
const unsigned int DirectAccessBit
Definition: Constants.h:142