prog.cpp: In member function ‘virtual const string& ObjectBase::ToString()’:
prog.cpp:31:10: warning: returning reference to temporary [-Wreturn-local-addr]
return "";
^~
prog.cpp: In member function ‘virtual const string& String::ToString()’:
prog.cpp:60:21: warning: returning reference to temporary [-Wreturn-local-addr]
return '\"' + D + '\"';
^~~~
prog.cpp: In member function ‘virtual const string& Boolean::ToString()’:
prog.cpp:85:23: warning: returning reference to temporary [-Wreturn-local-addr]
return D ? "true" : "false";
^~~~~~~
prog.cpp: In member function ‘virtual const string& Integer::ToString()’:
prog.cpp:110:26: warning: returning reference to temporary [-Wreturn-local-addr]
return std::to_string(D);
^
prog.cpp: In member function ‘virtual const string& Number::to_string()’:
prog.cpp:134:26: warning: returning reference to temporary [-Wreturn-local-addr]
return std::to_string(D);
^
prog.cpp: In member function ‘virtual const string& Null::ToString()’:
prog.cpp:153:10: warning: returning reference to temporary [-Wreturn-local-addr]
return "null";
^~~~~~
prog.cpp: In member function ‘virtual const string& Array::ToString()’:
prog.cpp:176:15: warning: reference to local variable ‘R’ returned [-Wreturn-local-addr]
std::string R;
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from prog.cpp:3:
/usr/include/c++/6/bits/stl_pair.h: In instantiation of ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const std::unique_ptr<ObjectBase>; _T2 = const std::unique_ptr<ObjectBase>; typename std::__decay_and_strip<_T2>::__type = std::unique_ptr<ObjectBase>; typename std::__decay_and_strip<_Tp>::__type = std::unique_ptr<ObjectBase>]’:
prog.cpp:219:72: required from here
/usr/include/c++/6/bits/stl_pair.h:498:14: error: no matching function for call to ‘std::pair<std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::pair(const std::unique_ptr<ObjectBase>, const std::unique_ptr<ObjectBase>)’
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:423:9: note: candidate: template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>)
pair(tuple<_Args1...>&, tuple<_Args2...>&,
^~~~
/usr/include/c++/6/bits/stl_pair.h:423:9: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: types ‘std::tuple<_Args1 ...>’ and ‘const std::unique_ptr<ObjectBase>’ have incompatible cv-qualifiers
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:356:9: note: candidate: template<class ... _Args1, class ... _Args2> std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>)
pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
^~~~
/usr/include/c++/6/bits/stl_pair.h:356:9: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: ‘std::unique_ptr<ObjectBase>’ is not derived from ‘std::tuple<_Args1 ...>’
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:351:21: note: candidate: template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&)
explicit constexpr pair(pair<_U1, _U2>&& __p)
^~~~
/usr/include/c++/6/bits/stl_pair.h:351:21: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: types ‘std::pair<_T1, _T2>’ and ‘const std::unique_ptr<ObjectBase>’ have incompatible cv-qualifiers
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:341:12: note: candidate: template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&)
constexpr pair(pair<_U1, _U2>&& __p)
^~~~
/usr/include/c++/6/bits/stl_pair.h:341:12: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: types ‘std::pair<_T1, _T2>’ and ‘const std::unique_ptr<ObjectBase>’ have incompatible cv-qualifiers
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:331:21: note: candidate: template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && (! _ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&)
explicit constexpr pair(_U1&& __x, _U2&& __y)
^~~~
/usr/include/c++/6/bits/stl_pair.h:331:21: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:330:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=false>
^~~~~
/usr/include/c++/6/bits/stl_pair.h:330:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:322:12: note: candidate: template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && _ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&)
constexpr pair(_U1&& __x, _U2&& __y)
^~~~
/usr/include/c++/6/bits/stl_pair.h:322:12: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:321:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=true>
^~~~
/usr/include/c++/6/bits/stl_pair.h:321:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:313:17: note: candidate: template<class _U2, typename std::enable_if<_CopyMovePair<false, std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >, _U2>(), bool>::type <anonymous> > std::pair<_T1, _T2>::pair(const _T1&, _U2&&)
explicit pair(const _T1& __x, _U2&& __y)
^~~~
/usr/include/c++/6/bits/stl_pair.h:313:17: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:312:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=false>
^~~~~
/usr/include/c++/6/bits/stl_pair.h:312:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:306:18: note: candidate: template<class _U2, typename std::enable_if<_CopyMovePair<true, std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >, _U2>(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&)
constexpr pair(const _T1& __x, _U2&& __y)
^~~~
/usr/include/c++/6/bits/stl_pair.h:306:18: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:305:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=true>
^~~~
/usr/include/c++/6/bits/stl_pair.h:305:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:299:27: note: candidate: template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> > >(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&)
explicit constexpr pair(_U1&& __x, const _T2& __y)
^~~~
/usr/include/c++/6/bits/stl_pair.h:299:27: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:298:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=false>
^~~~~
/usr/include/c++/6/bits/stl_pair.h:298:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:292:18: note: candidate: template<class _U1, typename std::enable_if<_MoveCopyPair<true, _U1, std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> > >(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&)
constexpr pair(_U1&& __x, const _T2& __y)
^~~~
/usr/include/c++/6/bits/stl_pair.h:292:18: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:291:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=true>
^~~~
/usr/include/c++/6/bits/stl_pair.h:291:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:285:17: note: candidate: constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = std::unique_ptr<ObjectBase>; _T2 = std::unique_ptr<ObjectBase>]
constexpr pair(pair&&) = default;
^~~~
/usr/include/c++/6/bits/stl_pair.h:285:17: note: candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/stl_pair.h:281:21: note: candidate: template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&)
explicit constexpr pair(const pair<_U1, _U2>& __p)
^~~~
/usr/include/c++/6/bits/stl_pair.h:281:21: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: ‘const std::unique_ptr<ObjectBase>’ is not derived from ‘const std::pair<_T1, _T2>’
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:272:19: note: candidate: template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<std::unique_ptr<ObjectBase>, _U1>::value) || (! std::is_same<std::unique_ptr<ObjectBase>, _U2>::value)), std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&)
constexpr pair(const pair<_U1, _U2>& __p)
^~~~
/usr/include/c++/6/bits/stl_pair.h:272:19: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: ‘const std::unique_ptr<ObjectBase>’ is not derived from ‘const std::pair<_T1, _T2>’
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:250:26: note: candidate: template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && (! _ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&)
explicit constexpr pair(const _T1& __a, const _T2& __b)
^~~~
/usr/include/c++/6/bits/stl_pair.h:250:26: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:249:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=false>
^~~~~
/usr/include/c++/6/bits/stl_pair.h:249:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:241:17: note: candidate: template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && _ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&)
constexpr pair(const _T1& __a, const _T2& __b)
^~~~
/usr/include/c++/6/bits/stl_pair.h:241:17: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:240:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
bool>::type=true>
^~~~
/usr/include/c++/6/bits/stl_pair.h:240:38: note: invalid template non-type parameter
/usr/include/c++/6/bits/stl_pair.h:223:26: note: candidate: template<class _U1, class _U2, typename std::enable_if<std::__and_<std::is_default_constructible<_Tp>, std::is_default_constructible<_U2>, std::__not_<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair()
explicit constexpr pair()
^~~~
/usr/include/c++/6/bits/stl_pair.h:223:26: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: candidate expects 0 arguments, 2 provided
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:210:26: note: candidate: template<class _U1, class _U2, typename std::enable_if<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair()
_GLIBCXX_CONSTEXPR pair()
^~~~
/usr/include/c++/6/bits/stl_pair.h:210:26: note: template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_pair.h:498:14: note: candidate expects 0 arguments, 2 provided
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp: In member function ‘virtual const string& Map::ToString()’:
prog.cpp:235:15: warning: reference to local variable ‘R’ returned [-Wreturn-local-addr]
std::string R;
^
In file included from /usr/include/c++/6/vector:62:0,
from prog.cpp:6:
/usr/include/c++/6/bits/stl_construct.h: In instantiation of ‘void std::_Construct(_T1*, _Args&& ...) [with _T1 = std::unique_ptr<ObjectBase>; _Args = {const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&}]’:
/usr/include/c++/6/bits/stl_uninitialized.h:75:18: required from ‘static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const std::unique_ptr<ObjectBase>*; _ForwardIterator = std::unique_ptr<ObjectBase>*; bool _TrivialValueTypes = false]’
/usr/include/c++/6/bits/stl_uninitialized.h:126:15: required from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const std::unique_ptr<ObjectBase>*; _ForwardIterator = std::unique_ptr<ObjectBase>*]’
/usr/include/c++/6/bits/stl_uninitialized.h:281:37: required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = const std::unique_ptr<ObjectBase>*; _ForwardIterator = std::unique_ptr<ObjectBase>*; _Tp = std::unique_ptr<ObjectBase>]’
/usr/include/c++/6/bits/stl_vector.h:1288:33: required from ‘void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const std::unique_ptr<ObjectBase>*; _Tp = std::unique_ptr<ObjectBase>; _Alloc = std::allocator<std::unique_ptr<ObjectBase> >]’
/usr/include/c++/6/bits/stl_vector.h:1261:4: required from ‘void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = const std::unique_ptr<ObjectBase>*; _Tp = std::unique_ptr<ObjectBase>; _Alloc = std::allocator<std::unique_ptr<ObjectBase> >]’
/usr/include/c++/6/bits/stl_vector.h:406:11: required from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = const std::unique_ptr<ObjectBase>*; <template-parameter-2-2> = void; _Tp = std::unique_ptr<ObjectBase>; _Alloc = std::allocator<std::unique_ptr<ObjectBase> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<ObjectBase> >]’
prog.cpp:163:76: required from here
/usr/include/c++/6/bits/stl_construct.h:75:7: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = ObjectBase; _Dp = std::default_delete<ObjectBase>]’
{ ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
from prog.cpp:7:
/usr/include/c++/6/bits/unique_ptr.h:359:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~
In file included from /usr/include/c++/6/bits/stl_map.h:63:0,
from /usr/include/c++/6/map:61,
from prog.cpp:5:
/usr/include/c++/6/tuple: In instantiation of ‘std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&}; long unsigned int ..._Indexes1 = {0ul}; _Args2 = {}; long unsigned int ..._Indexes2 = {}; _T1 = const std::unique_ptr<ObjectBase>; _T2 = std::unique_ptr<ObjectBase>]’:
/usr/include/c++/6/tuple:1579:63: required from ‘std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>) [with _Args1 = {const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&}; _Args2 = {}; _T1 = const std::unique_ptr<ObjectBase>; _T2 = std::unique_ptr<ObjectBase>]’
/usr/include/c++/6/ext/new_allocator.h:120:4: required from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >; _Args = {const std::piecewise_construct_t&, std::tuple<const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&>, std::tuple<>}; _Tp = std::_Rb_tree_node<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >]’
/usr/include/c++/6/bits/alloc_traits.h:455:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >; _Args = {const std::piecewise_construct_t&, std::tuple<const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&>, std::tuple<>}; _Tp = std::_Rb_tree_node<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::_Rb_tree_node<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > > >]’
/usr/include/c++/6/bits/stl_tree.h:543:32: required from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_construct_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&>, std::tuple<>}; _Key = std::unique_ptr<ObjectBase>; _Val = std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >; _KeyOfValue = std::_Select1st<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; _Compare = Map::PCmp; _Alloc = std::allocator<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >*]’
/usr/include/c++/6/bits/stl_tree.h:560:4: required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&>, std::tuple<>}; _Key = std::unique_ptr<ObjectBase>; _Val = std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >; _KeyOfValue = std::_Select1st<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; _Compare = Map::PCmp; _Alloc = std::allocator<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >*]’
/usr/include/c++/6/bits/stl_tree.h:2196:64: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const std::unique_ptr<ObjectBase, std::default_delete<ObjectBase> >&>, std::tuple<>}; _Key = std::unique_ptr<ObjectBase>; _Val = std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> >; _KeyOfValue = std::_Select1st<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; _Compare = Map::PCmp; _Alloc = std::allocator<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >]’
/usr/include/c++/6/bits/stl_map.h:483:8: required from ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::unique_ptr<ObjectBase>; _Tp = std::unique_ptr<ObjectBase>; _Compare = Map::PCmp; _Alloc = std::allocator<std::pair<const std::unique_ptr<ObjectBase>, std::unique_ptr<ObjectBase> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = std::unique_ptr<ObjectBase>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::unique_ptr<ObjectBase>]’
prog.cpp:228:13: required from here
/usr/include/c++/6/tuple:1590:70: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = ObjectBase; _Dp = std::default_delete<ObjectBase>]’
second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...)
^
In file included from /usr/include/c++/6/memory:81:0,
from prog.cpp:7:
/usr/include/c++/6/bits/unique_ptr.h:359:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~