Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/GSL_LITE
15 changes: 13 additions & 2 deletions include/morphio/vector_types.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
#pragma once

#if !gsl_CONFIG_ALLOWS_SPAN_COMPARISON
#include <algorithm>
#endif
#include <array>
#include <cmath> // M_PI
#include <vector>

#include <gsl/gsl-lite.hpp>
#include <gsl-lite/gsl-lite.hpp>

namespace morphio {

template <typename T>
using range = gsl::span<T>;
using range = gsl_lite::span<T>;

#if !gsl_CONFIG_ALLOWS_SPAN_COMPARISON
template <typename T>
inline bool operator==(morphio::range<T> l, morphio::range<T> 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;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <catch2/catch.hpp>
#include <gsl/gsl-lite.hpp>
#include <gsl-lite/gsl-lite.hpp>
#include <morphio/version.h>

#include <filesystem>
Expand Down
Loading