On Mar 3, 1:32*am, SG <s.gesem...@gmail.com> wrote:
> Why? What problem are you trying to solve?
My short term goal:
Get the original-post code to compile without specifying the template
argument. Your universal reference trick fixed this, thank you for
that help. However, I'm not sure why you specify "const" in the
template argument to std::forward. I'm not sure why you wouldn't
either. I just don't know about that. It seems since I sometimes
want to treat the universal reference as an lvalue that I would not
type 'const' anywhere.
My medium term goal:
I have a functor and an object. The functor wants to be passed some
parameter that is derived from the object. A "third party
intermediary" is
1. taking the functor and object
2. using the object to produce yet another "third party object"
3. pass the derived "third party object" to the functor
The difficulty is that the third party doesn't know if the object
should be a const reference or a mutable reference. And it doesn't
know whether the functor should be a const reference or a mutable
reference. I'm having trouble incorporating this concept into my
simple original post example. So you can look at...
My medium long term goal:
To statically store and retrieve the characteristics of a class's
members. For more info and a link to the github source you can jump
in to the thread here:
http://lists.boost.org/boost-users/2013/03/77972.php
My long term goals:
to make money, remodel my kitchen, make my wife happy, make me happy.
That's what all this really boils down to. My selfish desire to be
happy.
Thanks again,
Chris
===