This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[C++0x] add rvalue support to std::function


This adds move construction and move assignment to std::function, as
well function invocation with rvalue arguments, fixing the problem
reported at http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html

Still missing is support for constructing a std::function from a
non-copyable functor, that needs some additional changes to
_Function_base::_Base_manager which can be done at a later date.  In
the near future <tr1_impl/functional> should be split into two
separate files for C++1x and TR1 implementations, as they will diverge
further.

2009-11-30  Jonathan Wakely  <jwakely.gcc@gmail.com>

        * include/tr1_impl/functional (function): Add rvalue support and
        tweak doxygen markup.
        * testsuite/20_util/function/assign/move.cc: New.
        * testsuite/20_util/function/cons/move.cc: New.
        * testsuite/20_util/function/invoke/move_only.cc: New.
        * testsuite/20_util/function/cmp/cmp_neg.cc: New.
        * testsuite/20_util/function/1.cc: Copy from testsuite/tr1/.
        * testsuite/20_util/function/2.cc: Likewise.
        * testsuite/20_util/function/3.cc: Likewise.
        * testsuite/20_util/function/4.cc: Likewise.
        * testsuite/20_util/function/5.cc: Likewise.
        * testsuite/20_util/function/6.cc: Likewise.
        * testsuite/20_util/function/7.cc: Likewise.
        * testsuite/20_util/function/8.cc: Likewise.
        * testsuite/20_util/function/9.cc: Likewise.

tested x86_64/linux, I would like to commit this tomorrow before stage 3 ends.

Jonathan

Attachment: function_rval.txt
Description: Text document


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