std::unordered_set<Key,Hash,KeyEqual,Allocator>::insert 编辑 std::pair<iterator,bool> insert( const value_type& value ); (1) (C++11 起) std::pair<iterator,bool> insert( value_type&& value ); (2) (C++11 起) iterator insert( const_iterator hint, const value_type& value ); (3)...
std::swap(std::unordered_set) (C++11) erase_if(std::unordered_set) (C++20) Deduction guides(C++17) template< container-compatible-range<value_type> R > void insert_range( R&& rg ); (since C++23) Inserts a copy of each element of rg if and only if there is no element with key...
<cpp |container |unordered set std::pair<iterator,bool>insert(constvalue_type&value); (1)(since C++11) std::pair<iterator,bool>insert(value_type&&value); (2)(since C++11) iterator insert(const_iterator hint,constvalue_type&value); ...
否则,以std::forward<K>(obj)构造一个value_type类型的对象u,然后将u插入*this中,以hint为从何处开始搜索的非强制建议。如果equal_range(u)!=equal_range(obj)为true,则其行为未定义。value_type必须为以std::forward<K>(obj)向unordered_set中可就位构造(EmplaceConstructible)。仅当符合以下条件时,此重载才...