Untitled
unknown
plain_text
a year ago
4.7 kB
11
Indexable
In file included from prog_joined.cpp:1: In file included from /leetcode/precompiled/headers.h:34: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/algorithm:74: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/pstl/glue_algorithm_defs.h:13: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional:54: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:1820:2: error: no matching constructor for initialization of 'User' 1815 | second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:1807:9: note: in instantiation of function template specialization 'std::pair<const int, User>::pair<const int &, 0UL>' requested here 1802 | : pair(__first, __second, | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_construct.h:97:39: note: in instantiation of function template specialization 'std::pair<const int, User>::pair<const int &>' requested here 92 | { return ::new((void*)__location) _Tp(std::forward<_Args>(__args)...); } | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/alloc_traits.h:518:9: note: in instantiation of function template specialization 'std::construct_at<std::pair<const int, User>, const std::piecewise_construct_t &, std::tuple<const int &>, std::tuple<>>' requested here 513 | std::construct_at(__p, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable_policy.h:1878:27: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<const int, User>, false>>>::construct<std::pair<const int, User>, const std::piecewise_construct_t &, std::tuple<const int &>, std::tuple<>>' requested here 1873 | __node_alloc_traits::construct(_M_node_allocator(), | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable.h:304:19: note: in instantiation of function template specialization 'std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<const int, User>, false>>>::_M_allocate_node<const std::piecewise_construct_t &, std::tuple<const int &>, std::tuple<>>' requested here 299 | _M_node(__h->_M_allocate_node(std::forward<_Args>(__args)...)) | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable_policy.h:707:42: note: in instantiation of function template specialization 'std::_Hashtable<int, std::pair<const int, User>, std::allocator<std::pair<const int, User>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::_Scoped_node::_Scoped_node<const std::piecewise_construct_t &, std::tuple<const int &>, std::tuple<>>' requested here 702 | typename __hashtable::_Scoped_node __node { | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/unordered_map.h:980:16: note: in instantiation of member function 'std::__detail::_Map_base<int, std::pair<const int, User>, std::allocator<std::pair<const int, User>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::operator[]' requested here 975 | { return _M_h[__k]; } | ^ Line 53: Char 12: note: in instantiation of member function 'std::unordered_map<int, User>::operator[]' requested here 53 | map[selfId] = u; | ^ Line 15: Char 5: note: candidate constructor not viable: requires single argument 'userId', but no arguments were provided 15 | User(int userId): user_id(userId){} | ^ ~~~~~~~~~~ Line 10: Char 7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided 10 | class User { | ^~~~ Line 10: Char 7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided 10 | class User { | ^~~~ 1 error generated.
Editor is loading...
Leave a Comment