Changeset - r26089:2283e9229bb0
[Not reviewed]
master
0 2 0
Michael Lutz - 3 years ago 2021-10-28 21:10:03
michi@icosahedron.de
Fix: Template syntax error when using 'span' with a container type.
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/core/CMakeLists.txt
Show inline comments
 
@@ -26,5 +26,6 @@ add_files(
 
    smallmatrix_type.hpp
 
    smallstack_type.hpp
 
    smallvec_type.hpp
 
    span_type.hpp
 
    string_compare_type.hpp
 
)
src/core/span_type.hpp
Show inline comments
 
@@ -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>
0 comments (0 inline, 0 general)