Migrated from the original repository
Original issue: serge-sans-paille/frozen#163
Originally reported by: @barracuda156
Build failure on PowerPC macOS (g++-mp-12, C++20, -Werror):
test_unordered_map.cpp:22: error: modification of 'ze_map' is not a constant expression
22 | constexpr auto nocount = ze_map.count(3);
test_unordered_map.cpp:180: error: non-constant condition for static assertion
180 | static_assert(!ce.count(0), "");
test_unordered_map.cpp:181: error: non-constant condition for static assertion
181 | static_assert(ce.find(0) == ce.end(), "");
The root cause traced through the call chain leads to frozen::bits::seed_or_index(), which is apparently not a constant expression in this compiler/platform combination.
The same errors occur in test_unordered_set.cpp for ze_set.count() and similar static_assert checks.
Build environment:
- macOS (PowerPC)
- g++-mp-12
-std=gnu++20 -arch ppc -mmacosx-version-min=10.6 -Wall -Wextra -Wpedantic -Werror -Wshadow
- frozen 1.1.1
Build failure on PowerPC macOS (g++-mp-12, C++20,
-Werror):The root cause traced through the call chain leads to
frozen::bits::seed_or_index(), which is apparently not a constant expression in this compiler/platform combination.The same errors occur in
test_unordered_set.cppforze_set.count()and similarstatic_assertchecks.Build environment:
-std=gnu++20 -arch ppc -mmacosx-version-min=10.6 -Wall -Wextra -Wpedantic -Werror -Wshadow