------- Comment #1 from lloyd at randombit dot net 2009-11-27 21:39 ------- Created an attachment (id=19165) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19165&action=view) Test case
Here is the full output compiling this on my machine: $ g++-4.5-20091112 -Wall -W -std=c++0x movable.cpp -o move In file included from /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/vector:69:0, from movable.cpp:1: /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/future: In member function 'void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {std::unique_future<int>}, _Tp = std::unique_future<int>, _Alloc = std::allocator<std::unique_future<int> >, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::unique_future<int>*, std::vector<std::unique_future<int> > >, typename std::vector<_Tp, _Alloc>::_Base::_Tp_alloc_type::pointer = std::unique_future<int>*]': /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/vector.tcc:100:4: instantiated from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {std::unique_future<int>}, _Tp = std::unique_future<int>, _Alloc = std::allocator<std::unique_future<int> >]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_vector.h:747:9: instantiated from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::unique_future<int>, _Alloc = std::allocator<std::unique_future<int> >, value_type = std::unique_future<int>]' movable.cpp:12:50: instantiated from here /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/future:440:22: error: deleted function 'std::unique_future<_Res>& std::unique_future<_Res>::operator=(const std::unique_future<_Res>&) [with _Res = int]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/vector.tcc:314:4: error: used here In file included from /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/vector:61:0, from movable.cpp:1: /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/future: In static member function 'static _BI2 std::__copy_move_backward<true, false, std::random_access_iterator_tag>::__copy_move_b(_BI1, _BI1, _BI2) [with _BI1 = std::unique_future<int>*, _BI2 = std::unique_future<int>*]': /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:596:18: instantiated from '_BI2 std::__copy_move_backward_a(_BI1, _BI1, _BI2) [with bool _IsMove = true, _BI1 = std::unique_future<int>*, _BI2 = std::unique_future<int>*]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:606:45: instantiated from '_BI2 std::__copy_move_backward_a2(_BI1, _BI1, _BI2) [with bool _IsMove = true, _BI1 = std::unique_future<int>*, _BI2 = std::unique_future<int>*]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:677:56: instantiated from '_BI2 std::move_backward(_BI1, _BI1, _BI2) [with _BI1 = std::unique_future<int>*, _BI2 = std::unique_future<int>*]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/vector.tcc:308:4: instantiated from 'void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {std::unique_future<int>}, _Tp = std::unique_future<int>, _Alloc = std::allocator<std::unique_future<int> >, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::unique_future<int>*, std::vector<std::unique_future<int> > >, typename std::vector<_Tp, _Alloc>::_Base::_Tp_alloc_type::pointer = std::unique_future<int>*]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/vector.tcc:100:4: instantiated from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {std::unique_future<int>}, _Tp = std::unique_future<int>, _Alloc = std::allocator<std::unique_future<int> >]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_vector.h:747:9: instantiated from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::unique_future<int>, _Alloc = std::allocator<std::unique_future<int> >, value_type = std::unique_future<int>]' movable.cpp:12:50: instantiated from here /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/future:440:22: error: deleted function 'std::unique_future<_Res>& std::unique_future<_Res>::operator=(const std::unique_future<_Res>&) [with _Res = int]' /usr/local/gcc-4.5-20091112/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:561:6: error: used here -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42201