diff --git a/include/span.h b/include/span.h index dcce344..74a5e11 100644 --- a/include/span.h +++ b/include/span.h @@ -1610,8 +1610,12 @@ public: {} // from array view - template > - constexpr strided_span(span av, bounds_type bounds) : strided_span(av.data(), av.bounds().total_size(), std::move(bounds)) + template ::value, + typename Dummy = std::enable_if_t + > + constexpr strided_span(span av, bounds_type bounds) : strided_span(av.data(), av.bounds().total_size(), std::move(bounds)) {} // convertible diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index 8a7c552..a78fe6e 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -333,7 +333,7 @@ SUITE(span_tests) CHECK(sav_c[1] == 2); #if _MSC_VER > 1800 - strided_span sav_v{ {src}, {2, 1} }; + strided_span sav_v{ src, {2, 1} }; #else strided_span sav_v{ span{src}, strided_bounds<1>{2, 1} }; #endif @@ -342,7 +342,7 @@ SUITE(span_tests) CHECK(sav_v[1] == 2); #if _MSC_VER > 1800 - strided_span sav_cv{ {src}, {2, 1} }; + strided_span sav_cv{ src, {2, 1} }; #else strided_span sav_cv{ span{src}, strided_bounds<1>{2, 1} }; #endif @@ -361,7 +361,7 @@ SUITE(span_tests) CHECK(sav_c[1] == 2); #if _MSC_VER > 1800 - strided_span sav_cv{ {src}, {2, 1} }; + strided_span sav_cv{ src, {2, 1} }; #else strided_span sav_cv{ span{src}, strided_bounds<1>{2, 1} }; #endif @@ -381,7 +381,7 @@ SUITE(span_tests) CHECK(sav_v[1] == 2); #if _MSC_VER > 1800 - strided_span sav_cv{ {src}, {2, 1} }; + strided_span sav_cv{ src, {2, 1} }; #else strided_span sav_cv{ span{src}, strided_bounds<1>{2, 1} }; #endif