Author
anonymous
almost 7 years ago
Language
C++
Compiler
gcc HEAD 9.0.0 20181103 (experimental)
Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
Author
anonymous
almost 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a
In file included from /opt/wandbox/gcc-head/include/c++/9.0.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /opt/wandbox/gcc-head/include/c++/9.0.0/bits/allocator.h:46,
from /opt/wandbox/gcc-head/include/c++/9.0.0/vector:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/9.0.0/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = foo; _Args = {foo}; _Tp = foo]':
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/alloc_traits.h:482:2: required from 'static void std::allocator_traits<std::allocator<_Tp1> >::construct(std::allocator_traits<std::allocator<_Tp1> >::allocator_type&, _Up*, _Args&& ...) [with _Up = foo; _Args = {foo}; _Tp = foo; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<foo>]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_uninitialized.h:886:67: required from 'void std::__relocate_object_a(_Tp*, _Up*, _Allocator&) [with _Tp = foo; _Up = foo; _Allocator = std::allocator<foo>]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_vector.h:428:35: required from 'constexpr const bool std::vector<foo>::__use_relocate'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/vector.tcc:460:4: required from 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const foo&}; _Tp = foo; _Alloc = std::allocator<foo>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<foo*, std::vector<foo> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = foo*]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_vector.h:1159:4: required from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = foo; _Alloc = std::allocator<foo>; std::vector<_Tp, _Alloc>::value_type = foo]'
prog.cc:20:18: required from here
/opt/wandbox/gcc-head/include/c++/9.0.0/ext/new_allocator.h:145:20: error: use of deleted function 'foo::foo(foo&&)'
145 | noexcept(noexcept(::new((void *)__p)
| ^~~~~~~~~~~~~~~~~~
146 | _Up(std::forward<_Args>(__args)...)))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:12:5: note: declared here
12 | foo(foo &&) =delete;
| ^~~
Exit Code:
1