Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 6 years ago

Language

C++

Compiler

gcc HEAD 10.0.0 20190710 (experimental)

Options
Warnings
Boost 1.70.0
C++17
-pedantic-errors

Author

anonymous

almost 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=c++17 -pedantic-errors
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/allocator.h:46,
                 from /opt/wandbox/gcc-head/include/c++/10.0.0/unordered_map:40,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<const C, int>; _Args = {const std::pair<const C, int>&}; _Tp = std::__detail::_Hash_node<std::pair<const C, int>, true>]':
/opt/wandbox/gcc-head/include/c++/10.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 = std::pair<const C, int>; _Args = {const std::pair<const C, int>&}; _Tp = std::__detail::_Hash_node<std::pair<const C, int>, true>; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<std::__detail::_Hash_node<std::pair<const C, int>, true> >]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/hashtable_policy.h:2057:36:   required from 'std::__detail::_Hashtable_alloc<_NodeAlloc>::__node_type* std::__detail::_Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&& ...) [with _Args = {const std::pair<const C, int>&}; _NodeAlloc = std::allocator<std::__detail::_Hash_node<std::pair<const C, int>, true> >; std::__detail::_Hashtable_alloc<_NodeAlloc>::__node_type = std::__detail::_Hash_node<std::pair<const C, int>, true>]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/hashtable_policy.h:167:58:   required from 'std::__detail::_AllocNode<_NodeAlloc>::__node_type* std::__detail::_AllocNode<_NodeAlloc>::operator()(_Arg&&) const [with _Arg = const std::pair<const C, int>&; _NodeAlloc = std::allocator<std::__detail::_Hash_node<std::pair<const C, int>, true> >; std::__detail::_AllocNode<_NodeAlloc>::__node_type = std::__detail::_Hash_node<std::pair<const C, int>, true>]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/hashtable.h:1805:33:   required from 'std::pair<typename std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::iterator, bool> std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_M_insert(_Arg&&, const _NodeGenerator&, std::true_type, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type) [with _Arg = const std::pair<const C, int>&; _NodeGenerator = std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<const C, int>, true> > >; _Key = C; _Value = std::pair<const C, int>; _Alloc = std::allocator<std::pair<const C, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<C>; _H1 = Hash; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; typename std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::iterator = std::__detail::_Node_iterator<std::pair<const C, int>, false, true>; std::true_type = std::integral_constant<bool, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = long unsigned int]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/hashtable_policy.h:840:55:   required from 'std::__detail::_Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__ireturn_type std::__detail::_Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::insert(const value_type&) [with _Key = C; _Value = std::pair<const C, int>; _Alloc = std::allocator<std::pair<const C, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<C>; _H1 = Hash; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::__detail::_Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__ireturn_type = std::pair<std::__detail::_Node_iterator<std::pair<const C, int>, false, true>, bool>; std::__detail::_Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::value_type = std::pair<const C, int>]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/hashtable.h:1021:4:   required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(_InputIterator, _InputIterator, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&) [with _InputIterator = const std::pair<const C, int>*; _Key = C; _Value = std::pair<const C, int>; _Alloc = std::allocator<std::pair<const C, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<C>; _H1 = Hash; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = long unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::allocator_type = std::allocator<std::pair<const C, int> >]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/hashtable.h:488:26:   required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(std::initializer_list<_Up>, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const _H1&, const key_equal&, const allocator_type&) [with _Key = C; _Value = std::pair<const C, int>; _Alloc = std::allocator<std::pair<const C, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<C>; _H1 = Hash; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = long unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::key_equal = std::equal_to<C>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::allocator_type = std::allocator<std::pair<const C, int> >]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/unordered_map.h:231:40:   required from 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::initializer_list<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__is_nothrow_invocable<const _Hash&, const _Key&> > >::value, false, true> >::value_type>, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = C; _Tp = int; _Hash = Hash; _Pred = std::equal_to<C>; _Alloc = std::allocator<std::pair<const C, int> >; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__is_nothrow_invocable<const _Hash&, const _Key&> > >::value, false, true> >::value_type = std::pair<const C, int>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = Hash; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<C>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const C, int> >]'
prog.cc:29:5:   required from here
/opt/wandbox/gcc-head/include/c++/10.0.0/ext/new_allocator.h:150:20: error: use of deleted function 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const C; _T2 = int]'
  150 |  noexcept(noexcept(::new((void *)__p)
      |                    ^~~~~~~~~~~~~~~~~~
  151 |        _Up(std::forward<_Args>(__args)...)))
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/unordered_map:43,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_pair.h:311:17: note: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const C; _T2 = int]' is implicitly deleted because the default definition would be ill-formed:
  311 |       constexpr pair(const pair&) = default; ///< Copy constructor
      |                 ^~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_pair.h:311:17: error: use of deleted function 'C::C(const C&)'
prog.cc:7:5: note: declared here
    7 |     C(const C&) = delete;
      |     ^
Exit Code:
1