Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$
In file included from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/8.0.1/variant: In instantiation of 'void std::__detail::__variant::__erased_assign(void*, void*) [with _Lhs = std::unique_ptr<Node>&; _Rhs = const std::unique_ptr<Node>&]':
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:607:27: required from 'std::__detail::__variant::_Move_assign_base<<anonymous>, _Types>& std::__detail::__variant::_Move_assign_base<<anonymous>, _Types>::operator=(std::__detail::__variant::_Move_assign_base<<anonymous>, _Types>&&) [with bool <anonymous> = false; _Types = {std::unique_ptr<Node, std::default_delete<Node> >, EmptyTree}]'
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:648:12: required from here
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:258:42: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = Node; _Dp = std::default_delete<Node>]'
__variant::__ref_cast<_Lhs>(__lhs) = __variant::__ref_cast<_Rhs>(__rhs);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/memory:80,
from prog.cc:3:
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/unique_ptr.h:395:19: note: declared here
unique_ptr& operator=(const unique_ptr&) = delete;
^~~~~~~~
In file included from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/8.0.1/variant: In instantiation of 'void std::__detail::__variant::__erased_ctor(void*, void*) [with _Lhs = std::unique_ptr<Node>&; _Rhs = const std::unique_ptr<Node>&]':
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:468:30: required from 'std::__detail::__variant::_Copy_ctor_base<<anonymous>, _Types>::_Copy_ctor_base(const std::__detail::__variant::_Copy_ctor_base<<anonymous>, _Types>&) [with bool <anonymous> = false; _Types = {std::unique_ptr<Node, std::default_delete<Node> >, EmptyTree}]'
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:509:7: required from 'std::__detail::__variant::_Move_assign_base<<anonymous>, _Types>& std::__detail::__variant::_Move_assign_base<<anonymous>, _Types>::operator=(std::__detail::__variant::_Move_assign_base<<anonymous>, _Types>&&) [with bool <anonymous> = false; _Types = {std::unique_ptr<Node, std::default_delete<Node> >, EmptyTree}]'
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:648:12: required from here
/opt/wandbox/gcc-head/include/c++/8.0.1/variant:246:7: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = Node; _Dp = std::default_delete<Node>]'
::new (__lhs) _Type(__variant::__ref_cast<_Rhs>(__rhs));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/memory:80,
from prog.cc:3:
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/unique_ptr.h:394:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~
Exit Code:
1