I'm accustomed to the existing interface of std::map
.
Inserting elements returns a bool describing successful insertion,
as well the iterator as to where the inserted element would be.
template< class P >
std::pair<iterator,bool> insert( P&& value ); //(since C++11)
C++17 adds what looks to be a similar call, but with different type names:
insert_return_type insert(node_type&& nh); //(since C++17)
I tried looking up what a node_type
is, but it is primarily unspecified:
template</*unspecified*/>
class /*unspecified*/
Why was this function added in C++17, and when would I use it over the older call?