diff --git a/include/groov/config.hpp b/include/groov/config.hpp index 219f46c..3aeb5cf 100644 --- a/include/groov/config.hpp +++ b/include/groov/config.hpp @@ -326,7 +326,7 @@ struct clear_t {}; constexpr auto clear = clear_t{}; template -CONSTEVAL auto transform_mask(RegType mask) -> RegType { +consteval auto transform_mask(RegType mask) -> RegType { if constexpr (requires { Bus::transform_mask(RegType{}); }) { return Bus::transform_mask(mask); } else { diff --git a/include/groov/path.hpp b/include/groov/path.hpp index c7840fd..0537008 100644 --- a/include/groov/path.hpp +++ b/include/groov/path.hpp @@ -74,7 +74,7 @@ constexpr inline auto parent(path<> const &) { return path<>{}; } template using parent_t = decltype(parent(Path{})); template -CONSTEVAL auto make_path() -> pathlike auto { +consteval auto make_path() -> pathlike auto { constexpr auto p = stdx::split(); if constexpr (p.second.empty()) { if constexpr (p.first.empty()) { @@ -89,36 +89,30 @@ CONSTEVAL auto make_path() -> pathlike auto { namespace literals { #if __clang__ && __clang_major__ <= 14 -template -CONSTEVAL_UDL auto operator""_g() -> pathlike auto { +template consteval auto operator""_g() -> pathlike auto { constexpr auto s = stdx::ct_string{{chars..., 0}}; return make_path(); } -template -CONSTEVAL_UDL auto operator""_r() -> pathlike auto { +template consteval auto operator""_r() -> pathlike auto { constexpr auto s = stdx::ct_string{{chars..., 0}}; return make_path(); } -template -CONSTEVAL_UDL auto operator""_f() -> pathlike auto { +template consteval auto operator""_f() -> pathlike auto { constexpr auto s = stdx::ct_string{{chars..., 0}}; return make_path(); } #else -template -CONSTEVAL_UDL auto operator""_g() -> pathlike auto { +template consteval auto operator""_g() -> pathlike auto { return make_path(); } -template -CONSTEVAL_UDL auto operator""_r() -> pathlike auto { +template consteval auto operator""_r() -> pathlike auto { return make_path(); } -template -CONSTEVAL_UDL auto operator""_f() -> pathlike auto { +template consteval auto operator""_f() -> pathlike auto { return make_path(); } #endif diff --git a/include/groov/read.hpp b/include/groov/read.hpp index 8352c80..d2589a0 100644 --- a/include/groov/read.hpp +++ b/include/groov/read.hpp @@ -59,7 +59,7 @@ template struct to_register_q { template using to_fields = typename Register::children_t; -template CONSTEVAL auto check_writeonly_field() { +template consteval auto check_writeonly_field() { constexpr auto mask_overlap = F::template mask & Mask; if constexpr (registerlike) { STATIC_ASSERT(not write_only_write_function or @@ -75,7 +75,7 @@ template CONSTEVAL auto check_writeonly_field() { } template -CONSTEVAL auto check_write_only() -> void { +consteval auto check_write_only() -> void { [[maybe_unused]] auto r = stdx::for_each( [](boost::mp11::mp_list, auto mask) { constexpr auto read_mask = transform_mask(mask()); diff --git a/include/groov/write.hpp b/include/groov/write.hpp index 4912501..45cc893 100644 --- a/include/groov/write.hpp +++ b/include/groov/write.hpp @@ -56,7 +56,7 @@ template using compute_reg_id_value_t = std::integral_constant; -template CONSTEVAL auto check_readonly_field() { +template consteval auto check_readonly_field() { if constexpr (registerlike) { STATIC_ASSERT(not read_only_write_function, "Attempting to write to a read-only register: {}", @@ -67,7 +67,7 @@ template CONSTEVAL auto check_readonly_field() { } } -template CONSTEVAL auto check_read_only() -> void { +template consteval auto check_read_only() -> void { [[maybe_unused]] auto r = stdx::for_each( [](boost::mp11::mp_list) { (check_readonly_field(), ...); @@ -75,7 +75,7 @@ template CONSTEVAL auto check_read_only() -> void { L{}); } -template CONSTEVAL auto check_rmw_field() { +template consteval auto check_rmw_field() { constexpr auto mask_overlap = F::template mask & Mask; STATIC_ASSERT(not write_only_write_function or identity_write_function or @@ -84,7 +84,7 @@ template CONSTEVAL auto check_rmw_field() { } template -CONSTEVAL auto check_rmw() -> void { +consteval auto check_rmw() -> void { [[maybe_unused]] auto r = stdx::for_each( [](boost::mp11::mp_list, auto mask) { [[maybe_unused]] constexpr auto write_mask = diff --git a/include/groov/write_spec.hpp b/include/groov/write_spec.hpp index 6ccd9ec..bf4321e 100644 --- a/include/groov/write_spec.hpp +++ b/include/groov/write_spec.hpp @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/test/config.cpp b/test/config.cpp index 3cd4c30..c5ce47d 100644 --- a/test/config.cpp +++ b/test/config.cpp @@ -186,7 +186,7 @@ struct be_bus { } template - CONSTEVAL static auto transform_mask(RegType mask) -> RegType { + consteval static auto transform_mask(RegType mask) -> RegType { using A = std::array; auto arr = stdx::bit_cast(mask); for (auto &i : arr) { diff --git a/test/read.cpp b/test/read.cpp index 4724a4f..40d3b95 100644 --- a/test/read.cpp +++ b/test/read.cpp @@ -291,7 +291,7 @@ struct be_bus { } template - CONSTEVAL static auto transform_mask(RegType mask) -> RegType { + consteval static auto transform_mask(RegType mask) -> RegType { using A = std::array; auto arr = stdx::bit_cast(mask); for (auto &i : arr) { diff --git a/test/write.cpp b/test/write.cpp index 7c4a2a9..7f0858b 100644 --- a/test/write.cpp +++ b/test/write.cpp @@ -512,7 +512,7 @@ struct be_bus { } template - CONSTEVAL static auto transform_mask(RegType mask) -> RegType { + consteval static auto transform_mask(RegType mask) -> RegType { using A = std::array; auto arr = stdx::bit_cast(mask); for (auto &i : arr) {