P4006R0 — Transparent Function Objects for Shift Operators (5 items) LEWG
Daniel Towner
This paper proposes adding std::bit_lshift<> and std::bit_rshift<> as transparent function objects in to complete the set of bitwise operator functors. These follow the same transparent pattern as existing functors such as bit_and<> and plus<>, forwarding directly to the built-in << and >> operators with identical semantics. The paper also documents why other C++ operators without existing transparent function objects should remain excluded.

References — Anthropic Citations API

[1]
"(References section lists only N3421 and P2964R1)"
[2] chars 11559–13428
"Wording Add to [version.syn]: ``` «+#define __cpp_lib_bitwise_shift_functors YYYYMML // also in +» ``` Add to [functional.syn] in : ``` namespace std { //..."
[2] chars 11559–13428
"Wording Add to [version.syn]: ``` «+#define __cpp_lib_bitwise_shift_functors YYYYMML // also in +» ``` Add to [functional.syn] in : ``` namespace std { //..."
[3]
"constexpr T operator()(const T& lhs, const T& rhs) const; and constexpr auto operator()(T&& lhs, U&& rhs) const"
[4] chars 11559–13428
"Wording Add to [version.syn]: ``` «+#define __cpp_lib_bitwise_shift_functors YYYYMML // also in +» ``` Add to [functional.syn] in : ``` namespace std { //..."
[4] chars 11559–13428
"Wording Add to [version.syn]: ``` «+#define __cpp_lib_bitwise_shift_functors YYYYMML // also in +» ``` Add to [functional.syn] in : ``` namespace std { //..."
Summary: P4006R0 proposes adding std::bit_lshift and std::bit_rshift transparent function objects to , paralleling the existing bit_and, bit_or, bit_xor, and bit_not in [bitwise.operations]. The paper targets consistency with P3793R1 which adds similar functors for other missing operators.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.