From 697da8724fa61a71c6173f54cde0d56a08797852 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 27 Oct 2019 00:47:33 -0700 Subject: Avoid an extraneous macro and use a simplified type alias --- common/alspan.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/alspan.h b/common/alspan.h index 42e3523e..cb34d410 100644 --- a/common/alspan.h +++ b/common/alspan.h @@ -72,15 +72,16 @@ namespace detail_ { struct has_size_and_data())), decltype(al::data(std::declval()))>> : std::true_type { }; + + template + using remove_pointer_t = typename std::remove_pointer::type; } // namespace detail_ #define REQUIRES(...) bool rt_=true, typename std::enable_if::type = true -#define USABLE_CONTAINER_DATA(...) \ - std::is_convertible()))>::type(*)[],element_type(*)[]>::value #define IS_VALID_CONTAINER(C) \ !detail_::is_span::value && !detail_::is_std_array::value && \ !std::is_array::value && detail_::has_size_and_data::value && \ - USABLE_CONTAINER_DATA(C&) + std::is_convertible()))>(*)[],element_type(*)[]>::value template class span { @@ -289,7 +290,6 @@ constexpr inline auto span::subspan(size_t offset, size_t count) const -> s } #undef IS_VALID_CONTAINER -#undef USABLE_CONTAINER_DATA #undef REQUIRES } // namespace al -- cgit v1.2.3