fix for libc++ and c++2a

This commit is contained in:
Hans Dembinski 2019-11-04 20:47:56 +01:00 committed by GitHub
parent f56337177d
commit 6d7838d8b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,11 +7,6 @@
#ifndef BOOST_HISTOGRAM_DETAIL_SPAN_HPP
#define BOOST_HISTOGRAM_DETAIL_SPAN_HPP
#include <boost/assert.hpp>
#include <boost/core/nvp.hpp>
#include <boost/histogram/detail/static_if.hpp>
#include <type_traits>
#if __cpp_constexpr >= 201603 && __cpp_deduction_guides >= 201703 && \
__cpp_lib_nonmember_container_access >= 201411 && __has_include(<span>)
#include <span>
@ -225,8 +220,21 @@ public:
}
};
} // namespace detail
} // namespace histogram
} // namespace boost
#endif
#include <boost/histogram/detail/non_member_container_access.hpp>
#include <utility>
namespace boost {
namespace histogram {
namespace detail {
namespace dtl = ::boost::histogram::detail;
template <class T>
auto make_span(T* begin, T* end) {
return dtl::span<T>{begin, end};