diff --git a/compilation_tests/ctest_layout_convertible.cpp b/compilation_tests/ctest_layout_convertible.cpp index 2da8b84e..935085db 100644 --- a/compilation_tests/ctest_layout_convertible.cpp +++ b/compilation_tests/ctest_layout_convertible.cpp @@ -91,4 +91,24 @@ MDSPAN_STATIC_TEST( !std::is_constructible>::value ); - +MDSPAN_STATIC_TEST(std::is_constructible>::value); +MDSPAN_STATIC_TEST(std::is_convertible, LS1>::value); +MDSPAN_STATIC_TEST(std::is_assignable>::value); + +MDSPAN_STATIC_TEST(std::is_constructible>::value); +MDSPAN_STATIC_TEST(std::is_convertible, LS1>::value); +MDSPAN_STATIC_TEST(std::is_assignable>::value); + +MDSPAN_STATIC_TEST(std::is_constructible>::value); +MDSPAN_STATIC_TEST(std::is_convertible, LS1>::value); +MDSPAN_STATIC_TEST(std::is_assignable>::value); + +#if MDSPAN_HAS_CXX_17 +MDSPAN_STATIC_TEST(std::is_constructible::mapping>::value); +MDSPAN_STATIC_TEST(std::is_convertible::mapping, LS1>::value); +MDSPAN_STATIC_TEST(std::is_assignable::mapping>::value); + +MDSPAN_STATIC_TEST(std::is_constructible::mapping>::value); +MDSPAN_STATIC_TEST(std::is_convertible::mapping, LS1>::value); +MDSPAN_STATIC_TEST(std::is_assignable::mapping>::value); +#endif diff --git a/include/experimental/__p0009_bits/layout_stride.hpp b/include/experimental/__p0009_bits/layout_stride.hpp index c1a31513..2227f230 100644 --- a/include/experimental/__p0009_bits/layout_stride.hpp +++ b/include/experimental/__p0009_bits/layout_stride.hpp @@ -21,6 +21,10 @@ #include "compressed_pair.hpp" #include "utility.hpp" +#if MDSPAN_HAS_CXX_17 +#include "../__p2642_bits/layout_padded_fwd.hpp" +#endif + #if !defined(MDSPAN_IMPL_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS) # include "no_unique_address.hpp" #endif @@ -441,6 +445,8 @@ struct layout_stride { !(std::is_convertible::value && (detail::is_mapping_of || detail::is_mapping_of || + MDSPAN_IMPL_PROPOSED_NAMESPACE::detail::is_layout_left_padded_mapping::value || // Don't need to guard for C++14 as this isn't compiled in < C++20 + MDSPAN_IMPL_PROPOSED_NAMESPACE::detail::is_layout_right_padded_mapping::value || detail::is_mapping_of)) ) // needs two () due to comma MDSPAN_INLINE_FUNCTION MDSPAN_IMPL_CONSTEXPR_14