Bug in BindStorage

Hello,

the following code fails :

this->provides( "func" ) \
->addOperation<void (MyClass::*)(A const &, B&), MyClass>("pouet",
&MyClass::func, this, RTT::OwnThread);

where the method func has tthe following prototype :

void toto(A const &, B&);

The issue lies in LocalMethod.hpp where the return elements are filtered
(line 503 and 228). The predicate used (is_out_arg) keep all AStore<T&>
but A const & is also matched by this predicate, although is not a
object that has to be returned.

So I had a specialization for is_out_arg (and is_return_arg) for T const
& which inherit from mpl::false_ in the attached patch.

This issue is not easily detectable, beacause it does not appear if the
arguments are inversed, ie :

void toto(B &, A const &);

in the this case, the code generated is similar to :

bf::vector<B> = bf::vector<AStore<B&>&, AStore<A const&> & >

whereas in the first case, the code is similar to :

bf::vector<B> = bf::vector<AStore<A const&> &, AStore<B&>& >

and the assignment of AStore<A const&> in B fails.

Regards,

AttachmentSize
0001-Storage-AStore-T-const-must-not-be-returned-when-col.patch1.18 KB