On tis 2025-02-11 at 09:29, Александр Поваляев via Std-Proposals wrote:
> A Proposal to Add a New Multiset container Method to the Standard
> Library Technical Report
>
> C++ Containers library std::multiset
>
> (1) size_type reduce( const Key& key );
>
> (2)
> template< class K >
> size_type reduce( K&& x );
>
> (3) size_type reduce( const Key& key, size_type count );
>
> (4)
> template< class K >
> size_type reduce( K&& x, size_type count );
>
> This method acts in right the opposite way to how method 'insert' does.
> Method 'reduce' decreases the number of std::multiset elements with
> the same key value. And while being supplied within the second argument
> 'size_type count', method 'reduce' decreases the number of std::multiset
> elements with the same key value but several times.
>
How do we know if the function is to remove the oldest or the newest
inserts? Or some in the middle?
The order of the elements that compare equivalent is the order of insertion and does not change. | (since C++11) |
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals