From 010ab921bf5a4ae94cd0b883fe4022e5375e21eb Mon Sep 17 00:00:00 2001 From: Vincent Zalzal Date: Fri, 2 Jun 2017 00:55:25 -0400 Subject: [PATCH] Fix multi_span constructor taking a const std::array. (#523) not called even by the unit test (it was calling the "container" ctor instead). I mimicked the constructor taking a non-const std::array to fix the issue. --- include/gsl/multi_span | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gsl/multi_span b/include/gsl/multi_span index 6aeabc8..e381861 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -1332,10 +1332,10 @@ public: // construct from const std::array template - constexpr multi_span(const std::array, N>& arr) - : multi_span(arr.data(), static_bounds()) + constexpr multi_span(const std::array& arr) + : multi_span(arr.data(), bounds_type{static_bounds{}}) { - static_assert(std::is_convertible>::value, + static_assert(std::is_convertible(*)[]>::value, "Cannot convert from source type to target multi_span type."); static_assert(std::is_convertible, bounds_type>::value, "You cannot construct a multi_span from a std::array of smaller size.");