str/cexpr: Delete clang exemption
Old versions of libstdc++ were incompatible with constexpr std::string
support in clang. This is now fixed.
Change-Id: I8694ae2deeaa1a05f4d6575b491fa1e011dd3792
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/include/stdplus/str/cexpr.hpp b/include/stdplus/str/cexpr.hpp
index a3d5f1c..c2e804e 100644
--- a/include/stdplus/str/cexpr.hpp
+++ b/include/stdplus/str/cexpr.hpp
@@ -9,8 +9,8 @@
template <auto f, bool nul>
consteval auto cexprToStrArr()
{
- std::array<typename decltype(f())::value_type, f().size() + (nul ? 1 : 0)>
- ret;
+ constexpr std::size_t size = f().size();
+ std::array<typename decltype(f())::value_type, size + (nul ? 1 : 0)> ret;
{
auto res = f();
std::copy(res.begin(), res.end(), ret.begin());
diff --git a/test/meson.build b/test/meson.build
index 8e5a4db..8403e0f 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -14,6 +14,7 @@
'raw': [stdplus_dep, gmock_dep, gtest_main_dep],
'signal': [stdplus_dep, gtest_main_dep],
'str/cat': [stdplus_dep, gtest_main_dep],
+ 'str/cexpr': [stdplus_dep, gtest_main_dep],
'str/maps': [stdplus_dep, gmock_dep, gtest_main_dep],
'util/cexec': [stdplus_dep, gtest_main_dep],
'variant': [stdplus_dep, gtest_main_dep],
@@ -21,12 +22,6 @@
'zstring_view': [stdplus_dep, gtest_main_dep],
}
-if meson.get_compiler('cpp').get_id() != 'clang'
- gtests += {
- 'str/cexpr': [stdplus_dep, gtest_main_dep],
- }
-endif
-
if has_dl
gtests += {
'dl': [stdplus_dl_dep, gtest_main_dep],