Merge pull request #203 from ashtum/develop

detail::span_convertible handles void types
This commit is contained in:
Peter Dimov
2025-10-24 11:36:04 +03:00
committed by GitHub
2 changed files with 28 additions and 2 deletions

View File

@@ -23,9 +23,17 @@ class span;
namespace detail {
template<class U, class T, class = void>
struct span_convertible
{
static constexpr bool value = false;
};
template<class U, class T>
struct span_convertible {
static constexpr bool value = std::is_convertible<U(*)[], T(*)[]>::value;
struct span_convertible<U, T, typename std::enable_if<
std::is_convertible<U(*)[], T(*)[]>::value>::type>
{
static constexpr bool value = true;
};
template<std::size_t E, std::size_t N>