Author
anonymous
over 6 years ago
Language
C++
Compiler
gcc HEAD 9.0.0 20180919 (experimental)
Options
Warnings
Boost 1.68.0
C++17
no pedantic
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=c++17
In file included from /opt/wandbox/gcc-head/include/c++/9.0.0/vector:62,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_construct.h: In instantiation of 'void std::_Construct(_T1*, _Args&& ...) [with _T1 = NoCopy; _Args = {NoCopy}]':
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_uninitialized.h:83:18: required from 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<NoCopy*>; _ForwardIterator = NoCopy*; bool _TrivialValueTypes = false]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_uninitialized.h:134:15: required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<NoCopy*>; _ForwardIterator = NoCopy*]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_uninitialized.h:289:37: required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<NoCopy*>; _ForwardIterator = NoCopy*; _Tp = NoCopy]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_uninitialized.h:311:2: required from '_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = NoCopy*; _ForwardIterator = NoCopy*; _Allocator = std::allocator<NoCopy>]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/vector.tcc:448:6: required from 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int}; _Tp = NoCopy; _Alloc = std::allocator<NoCopy>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<NoCopy*, std::vector<NoCopy> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = NoCopy*]'
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/vector.tcc:109:4: required from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int}; _Tp = NoCopy; _Alloc = std::allocator<NoCopy>; std::vector<_Tp, _Alloc>::reference = NoCopy&]'
prog.cc:32:22: required from here
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/stl_construct.h:75:7: error: use of deleted function 'NoCopy::NoCopy(const NoCopy&)'
75 | { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:17:5: note: declared here
17 | NoCopy(const NoCopy&) = delete;
| ^~~~~~
Exit Code:
1