Fix: Template syntax error when using 'span' with a container type.

This commit is contained in:
Michael Lutz 2021-10-28 23:10:03 +02:00
parent 0c90326ada
commit 39e8783f4b
2 changed files with 3 additions and 2 deletions

View File

@ -26,5 +26,6 @@ add_files(
smallmatrix_type.hpp
smallstack_type.hpp
smallvec_type.hpp
span_type.hpp
string_compare_type.hpp
)

View File

@ -31,8 +31,8 @@ struct is_compatible_element
<
C, E, std::void_t<
decltype(std::data(std::declval<C>())),
typename std::remove_pointer<decltype(std::data( std::declval<C&>()))>::type(*)[]>
> : std::is_convertible<typename std::remove_pointer<decltype(std::data(std::declval<C&>()))>::type(*)[], E(*)[]>{};
typename std::remove_pointer_t<decltype(std::data( std::declval<C&>()))>(*)[]>
> : std::is_convertible<typename std::remove_pointer_t<decltype(std::data(std::declval<C&>()))>(*)[], E(*)[]>{};
/* Template to check if a container is compatible. gsl-lite also includes is_array and is_std_array, but as we don't use them, they are omitted. */
template <class C, class E>