This change avoids polyfilling the constinit and constexpr keywords,
which requires implicit polyfilling. Instead, this introduces a macro
that is straightforward to use and portable.
- Remove consteval and constinit language feature polyfills.
- Provide PW_CONSTINIT macro that uses the constinit keyword or compiler
attributes to guarantee constant initialization.
- Update PW_CONSTEVAL so it always marks functions constexpr.
Change-Id: I8b582b69a54717017bd30d4a33ae148f3a754095
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/50360
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
- Update labels so they use consistent naming. Instead of the
copy-and-pasted `chapter` prefix, name labels with a prefix consistent
with what they point to:
- "module-" for module
- "target-" for targets
- "docs-" for general documentation
- Remove the unnecessary highlight and default-domain directives.
Neither is necessary since the Pigweed docs always specify the
language in code snippets and other directives.
Change-Id: I55c34e9ec919f6f4670e5d3d008e0edf5fecf05b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/19328
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
- Implement std::endian from <bit> (__cpp_lib_endian).
- Replace pw::ByteOrder with std::endian.
- Update the <span> header to use the same approach as <bit> and define
the appropriate std::span feature macro.
Change-Id: I5575bde6efbabf71bac66d7f4dc2c2c136ae156f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17463
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
- The pw_polyfill module brings some C++17 features to C++11 and C++14.
- The module's overrides are added to the GN build to seamlessly
support older C++ standards.
Change-Id: Icb29772073e681e1ef868561bdde56e629e9c0d9