Re: [eigen] Return type of eval() for non-plain-object should not be const qualified |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi all,I want to check with the list if this is as intended (and I'm missing some big picture) or a bug:Currently T::eval() either returns a const reference if T is a plain object, which is fine, or a const object if T is an _expression_. I think evaluating an _expression_ should return just an object, not a const qualified object. This enables move assignment optimization that takes the result from evaluation, and return it directly, without creating a temporary copy.The relevant line is:typedef typename internal::add_const_on_value_type <typename internal::eval<Derived>::type>:: type EvalReturnType;in DenseBase.h
Thanks,Yuanchen
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |