#ifndef CRDTP_SPAN_H_
#define CRDTP_SPAN_H_
#include <cstdint>
#include <cstring>
#include <string>
#include <type_traits>
#include "export.h"
namespace crdtp {
template <typename T>
class span { … };
template <size_t N>
constexpr span<char> MakeSpan(const char (&str)[N]) { … }
template <size_t N>
constexpr span<uint8_t> SpanFrom(const char (&str)[N]) { … }
constexpr inline span<uint8_t> SpanFrom(const char* str) { … }
inline span<uint8_t> SpanFrom(const std::string& v) { … }
template <typename C,
typename = std::enable_if_t<
std::is_unsigned<typename C::value_type>{ … }
CRDTP_EXPORT bool SpanLessThan(span<uint8_t> x, span<uint8_t> y) noexcept;
CRDTP_EXPORT bool SpanEquals(span<uint8_t> x, span<uint8_t> y) noexcept;
CRDTP_EXPORT bool SpanLessThan(span<char> x, span<char> y) noexcept;
CRDTP_EXPORT bool SpanEquals(span<char> x, span<char> y) noexcept;
struct SpanLt { … };
}
#endif