diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-10-28 09:40:20 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-10-28 09:40:20 -0400 |
commit | 868f753d10b989e62152eb95f2a404b8be063a23 (patch) | |
tree | 6655c14548c67e90bbf124775f50e0d90fe4fedf /Eigen/src/Core/DenseCoeffsBase.h | |
parent | 1d4e80f09dd203450e390d80a64d9491e680869b (diff) |
document LvalueBit better
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. |