commit | bce17aa55c71909e790cb1dc7b43128a51241c92 | [log] [tgz] |
---|---|---|
author | Ewout van Bekkum <ewout@google.com> | Fri Jan 14 10:17:13 2022 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 19 02:07:37 2022 +0000 |
tree | 75b2af87ff181894ff8983280685e6945e7a52a2 | |
parent | 9198bc6dd7ee5d5c607d110af8bc32daa5475292 [diff] |
pw_polyfill/cstddef: Add missing constexpr specifiers The std::byte shift operators were missing the constexpr specifiers, this adds them back in. For reference: https://en.cppreference.com/w/cpp/types/byte Change-Id: I3610602e575332962df3f552695352fc1f2b7af5 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/78588 Reviewed-by: Wyatt Hepler <hepler@google.com> Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_polyfill/standard_library_public/pw_polyfill/standard_library/cstddef.h b/pw_polyfill/standard_library_public/pw_polyfill/standard_library/cstddef.h index cc97310..e8dfc9d 100644 --- a/pw_polyfill/standard_library_public/pw_polyfill/standard_library/cstddef.h +++ b/pw_polyfill/standard_library_public/pw_polyfill/standard_library/cstddef.h
@@ -61,12 +61,12 @@ constexpr byte& operator^=(byte& l, byte r) noexcept { return l = l ^ r; } template <typename I> -inline byte& operator<<=(byte& b, I shift) noexcept { +constexpr inline byte& operator<<=(byte& b, I shift) noexcept { return b = b << shift; } template <typename I> -inline byte& operator>>=(byte& b, I shift) noexcept { +constexpr inline byte& operator>>=(byte& b, I shift) noexcept { return b = b >> shift; }