diff --git a/3rdparty/GSL_LITE b/3rdparty/GSL_LITE index d6c8af99..56dab5ce 160000 --- a/3rdparty/GSL_LITE +++ b/3rdparty/GSL_LITE @@ -1 +1 @@ -Subproject commit d6c8af99a1d95b3db36f26b4f22dc3bad89952de +Subproject commit 56dab5ce071c4ca17d3e0dbbda9a94bd5a1cbca1 diff --git a/include/morphio/vector_types.h b/include/morphio/vector_types.h index 171bee9e..93cdfa08 100644 --- a/include/morphio/vector_types.h +++ b/include/morphio/vector_types.h @@ -1,15 +1,26 @@ #pragma once +#if !gsl_CONFIG_ALLOWS_SPAN_COMPARISON +#include +#endif #include #include // M_PI #include -#include +#include namespace morphio { template -using range = gsl::span; +using range = gsl_lite::span; + +#if !gsl_CONFIG_ALLOWS_SPAN_COMPARISON +template +inline bool operator==(morphio::range l, morphio::range r) { + return l.size() == r.size() && + (l.data() == r.data() || std::equal(l.begin(), l.end(), r.begin())); +} +#endif #ifdef MORPHIO_USE_DOUBLE using floatType = double; diff --git a/tests/test_utilities.cpp b/tests/test_utilities.cpp index cca04f7e..32d1a3af 100644 --- a/tests/test_utilities.cpp +++ b/tests/test_utilities.cpp @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ #include -#include +#include #include #include