forked from Kistler-Group/sdbus-cpp
fix: conditional use and tests of span (#411)
This commit is contained in:
@@ -36,8 +36,10 @@
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#if __cplusplus >= 202002L
|
||||
#include <span>
|
||||
#ifdef __has_include
|
||||
# if __has_include(<span>)
|
||||
# include <span>
|
||||
# endif
|
||||
#endif
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
@@ -104,7 +106,7 @@ namespace sdbus {
|
||||
Message& operator<<(const std::vector<_Element, _Allocator>& items);
|
||||
template <typename _Element, std::size_t _Size>
|
||||
Message& operator<<(const std::array<_Element, _Size>& items);
|
||||
#if __cplusplus >= 202002L
|
||||
#ifdef __cpp_lib_span
|
||||
template <typename _Element, std::size_t _Extent>
|
||||
Message& operator<<(const std::span<_Element, _Extent>& items);
|
||||
#endif
|
||||
@@ -140,7 +142,7 @@ namespace sdbus {
|
||||
Message& operator>>(std::vector<_Element, _Allocator>& items);
|
||||
template <typename _Element, std::size_t _Size>
|
||||
Message& operator>>(std::array<_Element, _Size>& items);
|
||||
#if __cplusplus >= 202002L
|
||||
#ifdef __cpp_lib_span
|
||||
template <typename _Element, std::size_t _Extent>
|
||||
Message& operator>>(std::span<_Element, _Extent>& items);
|
||||
#endif
|
||||
@@ -339,7 +341,7 @@ namespace sdbus {
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
#ifdef __cpp_lib_span
|
||||
template <typename _Element, std::size_t _Extent>
|
||||
inline Message& Message::operator<<(const std::span<_Element, _Extent>& items)
|
||||
{
|
||||
@@ -498,7 +500,7 @@ namespace sdbus {
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
#ifdef __cpp_lib_span
|
||||
template <typename _Element, std::size_t _Extent>
|
||||
inline Message& Message::operator>>(std::span<_Element, _Extent>& items)
|
||||
{
|
||||
|
||||
@@ -35,8 +35,10 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#if __cplusplus >= 202002L
|
||||
#include <span>
|
||||
#ifdef __has_include
|
||||
# if __has_include(<span>)
|
||||
# include <span>
|
||||
# endif
|
||||
#endif
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
@@ -399,7 +401,7 @@ namespace sdbus {
|
||||
}
|
||||
};
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
#ifdef __cpp_lib_span
|
||||
template <typename _Element, std::size_t _Extent>
|
||||
struct signature_of<std::span<_Element, _Extent>>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user