Namespaces
Variants
Views
Actions

Talk:cpp/container/map/insert

From cppreference.com
< Talk:cpp‎ | container‎ | map

In the example, the lines which are supposed to call the overloads #2 and #5 actually calll the overloads #3 and #6 respectively, because brace-init-lists cannot be used to deduce the template parameter P (see template argument deduction)

Indeed! Thanks for pointing that out --Ybab321 (talk) 05:02, 30 September 2021 (PDT)

Several of the overloads refer to "value_type" which is neither one of the template parameters <Key,T,Compare,Allocator>, nor defined further down.

It is specified "value - element value to insert" but that's not a type. What exactly is a "value_type" and what parameter does overload 1 accept? A std::pair<Key,T>? If so, it should be specified. A T? If so, what key is used?


value_type is defined on the std::map's main page as one of the Member types. This is a common practice for standard containers.--Space Mission (talk) 02:01, 30 September 2021 (PDT)