This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/45893] [C++0x] [DR 817] Finish updating std::bind to rvalue refs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45893

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-07 00:46:26 UTC ---
The _Bind and _Bind_result ctors need to be made into templates so that they
can deduce the arguments as either lvalue or rvalue references, allowing
_Bound_args elements to be move-constructed if an rvalue is passed to
std::bind.  Two template ctors are needed, for the case where the first
argument is an lvalue or an rvalue.

I added a copy ctor and move ctor, allowing _Bind and _Bind_result objects to
be moved

The new _Bind_helper and _Bindres_helper templates are simply to avoid
repeating typename _Maybe_wrap_member_pointer<typename
decay<_Functor>::type>::type in the return type and body of std::bind.

The call_once patch is for DR891, but is related to this PR because we use
std::bind to implement call_once.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]