GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing wg21.cmeerw.net — Issue 3656: Inconsistent bit operations returning a count - WG21 LWG Issues
Created on 2021-12-30.00:00:00 last changed 36 months ago Messages
Date: 2022-07-25.20:32:58
Proposed resolution: This wording is relative to N4901.
Date: 2022-07-25.00:00:00
[ 2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP. ]
Date: 2022-07-15.00:00:00
[ 2022-07-15; LWG telecon: move to Ready ]
Date: 2022-07-15.00:00:00
[ 2022-07-08; Reflector poll ] Set status to Tentatively Ready after ten votes in favour during reflector poll.
Date: 2022-02-22.00:00:00
[ 2022-02-22 LEWG telecon; Status changed: LEWG → Open ] No objection to unanimous consent to send the proposed resolution for LWG3656 to LWG for C++23. The changes in P1956 changed the functions to be more counting than mathematical.
Date: 2022-01-15.00:00:00
[ 2022-01-30; Reflector poll ] Set priority to 3 after reflector poll. Eight votes for P0, but request LEWG confirmation before setting it to Tentatively Ready.
Date: 2021-12-30.00:00:00
Among the bit operations returning a count, bit_width() is the only one not returning an int. This has the following consequences: std::uint64_t b64 = 1; b64 = std::rotr(b64, 1); int count1 = std::popcount(b64); // OK int count2 = std::countl_zero(b64); // OK int count3 = std::bit_width(b64); // OOPS The last line may result in a warning such as:
You have to use a static_cast to avoid the warning. Note that P0553R4 explicitly states the following design considerations, which I would also assume to apply to the later added functions from P0556R3:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402639 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||