mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06:45 +08:00
fix: [imp] VS2015 error C2610
This commit is contained in:
parent
3a3168b6f4
commit
595c1e4112
@ -38,9 +38,12 @@
|
||||
// Compiler
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define LIBIMP_CC_MSVC
|
||||
# define LIBIMP_CC_MSVC _MSC_VER
|
||||
# define LIBIMP_CC_MSVC_2015 1900
|
||||
# define LIBIMP_CC_MSVC_2017 1910
|
||||
# define LIBIMP_CC_MSVC_2019 1920
|
||||
#elif defined(__GNUC__)
|
||||
# define LIBIMP_CC_GNUC
|
||||
# define LIBIMP_CC_GNUC __GNUC__
|
||||
#else
|
||||
# error "This compiler is unsupported."
|
||||
#endif
|
||||
|
||||
@ -91,7 +91,10 @@ private:
|
||||
public:
|
||||
constexpr span() noexcept = default;
|
||||
constexpr span(span const &) noexcept = default;
|
||||
constexpr span & operator=(span const &) noexcept = default;
|
||||
#if (LIBIMP_CC_MSVC > LIBIMP_CC_MSVC_2015)
|
||||
constexpr
|
||||
#endif
|
||||
span & operator=(span const &) noexcept = default;
|
||||
|
||||
template <typename It,
|
||||
typename = detail::is_compatible_iter<T, It>>
|
||||
@ -128,7 +131,7 @@ public:
|
||||
: ptr_ (s.data())
|
||||
, extent_(s.size()) {}
|
||||
|
||||
#ifdef LIBIMP_CPP_20
|
||||
#if defined(LIBIMP_CPP_20) || defined(__cpp_lib_span)
|
||||
template <typename U, std::size_t E,
|
||||
typename = detail::is_array_convertible<U, T>>
|
||||
constexpr span(std::span<U, E> const &s) noexcept
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user