cplusplus / nbballot

Handling of NB comments in response to ballots
14 stars 4 forks source link

GB331 26.05.4 p3-6 Rename ceil2 and floor2 #327

Closed wg21bot closed 5 years ago

wg21bot commented 5 years ago

std::ceil2() & std::floor2() produce conceptual confusion std::ceil() is a linear operation, but std::ceil2() is an exponential operation. The '2' suffix does not provide any hint as to its fundamental difference from the std::ceil() function. std::floor2() suffers from the same defect. Spell out what the operations are exactly by renaming to ceil_power_of_two() and floor_power_of_two().

Proposed change: Rename std::ceil2() to std::ceil_power_of_two(). Rename std::floor2() to std::floor_power_of_two().

wg21bot commented 5 years ago

Duplicate of US328 #324.

Cpp-Lisa commented 5 years ago

Removed SG6 tag