diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-28 23:10:03 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 39e8783f4b8d24a27d28f99905acf8f54dec24fa (patch) | |
tree | d935339dadb07f6bf1c587128be3a20942651e9e /src/core | |
parent | 0c90326adae7d5b7be9e799fd73fb4765b49741e (diff) | |
download | openttd-39e8783f4b8d24a27d28f99905acf8f54dec24fa.tar.xz |
Fix: Template syntax error when using 'span' with a container type.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/core/span_type.hpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 96da08932..b94ed77e9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -26,5 +26,6 @@ add_files( smallmatrix_type.hpp smallstack_type.hpp smallvec_type.hpp + span_type.hpp string_compare_type.hpp ) diff --git a/src/core/span_type.hpp b/src/core/span_type.hpp index 03bc678b7..614be8456 100644 --- a/src/core/span_type.hpp +++ b/src/core/span_type.hpp @@ -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> |