diff options
Diffstat (limited to 'Eigen/src/Core/DenseCoeffsBase.h')
-rw-r--r-- | Eigen/src/Core/DenseCoeffsBase.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Eigen/src/Core/DenseCoeffsBase.h b/Eigen/src/Core/DenseCoeffsBase.h index 9de9ae280..b4dbe1d95 100644 --- a/Eigen/src/Core/DenseCoeffsBase.h +++ b/Eigen/src/Core/DenseCoeffsBase.h @@ -44,6 +44,11 @@ class DenseCoeffsBase<Derived,ReadOnlyAccessors> : public EigenBase<Derived> typedef typename internal::traits<Derived>::Index Index; typedef typename internal::traits<Derived>::Scalar Scalar; typedef typename internal::packet_traits<Scalar>::type PacketScalar; + + // explanation for this CoeffReturnType typedef. + // this is the return type of the coeff() method. + // The LvalueBit means exactly that we can offer a coeffRef() method, which means exactly that we can get references + // to coeffs, which means exactly that we can have coeff() return a const reference (as opposed to returning a value). typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit), const Scalar&, typename internal::conditional<internal::is_arithmetic<Scalar>::value, Scalar, const Scalar>::type @@ -230,7 +235,7 @@ class DenseCoeffsBase<Derived,ReadOnlyAccessors> : public EigenBase<Derived> protected: // explanation: DenseBase is doing "using ..." on the methods from DenseCoeffsBase. - // But some methods are only available in the EnableDirectAccessAPI case. + // But some methods are only available in the DirectAccess case. // So we add dummy methods here with these names, so that "using... " doesn't fail. // It's not private so that the child class DenseBase can access them, and it's not public // either since it's an implementation detail, so has to be protected. |