diff --git a/include/stdx/env.hpp b/include/stdx/env.hpp index 5da6d5e..4dbd423 100644 --- a/include/stdx/env.hpp +++ b/include/stdx/env.hpp @@ -33,7 +33,7 @@ template struct has_query { template struct env { template <_env::valid_query_over Q> - CONSTEVAL static auto query(Q) noexcept { + [[nodiscard]] CONSTEVAL static auto query(Q) noexcept { using I = boost::mp11::mp_find_if_q, _env::has_query>; using E = nth_t; diff --git a/include/stdx/span.hpp b/include/stdx/span.hpp index 67bbcee..8c91bb2 100644 --- a/include/stdx/span.hpp +++ b/include/stdx/span.hpp @@ -111,12 +111,12 @@ class span : public detail::span_base { "Span extends beyond available storage"); } + // NOLINTNEXTLINE(*-avoid-c-arrays) + template using arr_t = type_identity_t (&)[N]; + template // NOLINTNEXTLINE(google-explicit-constructor) - constexpr span( - // NOLINTNEXTLINE(*-avoid-c-arrays) - stdx::type_identity_t (&arr)[N] LIFETIMEBOUND) noexcept - : ptr{std::data(arr)} { + constexpr span(arr_t arr LIFETIMEBOUND) noexcept : ptr{std::data(arr)} { static_assert(Extent == dynamic_extent or Extent <= N, "Span extends beyond available storage"); } diff --git a/include/stdx/type_traits.hpp b/include/stdx/type_traits.hpp index 03189f8..488955f 100644 --- a/include/stdx/type_traits.hpp +++ b/include/stdx/type_traits.hpp @@ -54,7 +54,8 @@ struct call_base { }; template struct callable_test : call_base {}; -template struct callable_test : F, call_base {}; +template +struct callable_test : remove_cvref_t, call_base {}; template constexpr auto is_func_obj = true; template @@ -144,7 +145,7 @@ struct for_each_t> { (f.template operator()(), ...); } }; -template