Title
Setting the maximum load factor should return the previous value
Status
nad
Section
[unord.req][unord]
Submitter
Matt Austern

Created on 2009-08-10.00:00:00 last changed 163 months ago

Messages

Date: 2010-11-24.14:28:04

Proposed resolution:

In the unordered associative container requirements table, change:

Table 87 — Unordered associative container requirements (in addition to container)
ExpressionReturn typeAssertion/note pre-/post-condition Complexity
a.max_load_factor(z) void float Pre: z shall be positive. Changes the container's maximum load load factor, using z as a hint. Returns: the previous value of a.max_load_factor(). constant

Change the return type of set_max_load_factor in the class synopses in [unord.map], [unord.multimap], [unord.set], and [unord.multiset].

If issue 1188 is also accepted, make the same changes for min_load_factor.

Date: 2010-11-24.14:28:04

[ Moved to NAD at 2010-11 Batavia ]

Date: 2010-10-21.19:00:35

[ 2010 Rapperswil: ]

The benefit seems minor, while breaking with the getter/setter idiom these overloads support. Move to Tentatively NAD.

Date: 2009-08-10.00:00:00

The unordered associative container requirements table specifies that a.set_max_load_factor(z) has return type void. However, there is a useful piece of information to return: the previous value. Users who don't need it can always ignore it.

History
Date User Action Args
2010-11-24 14:28:04adminsetmessages: + msg5443
2010-10-21 19:00:35adminsetmessages: + msg4751
2010-10-21 19:00:35adminsetstatus: new -> nad
2010-10-21 18:28:33adminsetmessages: + msg1077
2009-08-10 00:00:00admincreate