A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/cpp_standard_library/cpp_set_insert.htm below:

C++ Set Library - insert Function

C++ Set Library - insert Function Description

It extends the container by inserting new elements.

Declaration

Following are the ways in which std::set::insert works in various C++ versions.

C++98
pair<iterator,bool> insert (const value_type& val);
C++11
pair<iterator,bool> insert (const value_type& val);
pair<iterator,bool> insert (value_type&& val);
Return value

It returns a pair with its members.

Exceptions

If a single element is to be inserted, there are no changes in the container in case of exception.

Time complexity

Time complexity is contstant.

set.htm


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4