19 #include <type_traits> 21 #include <phosphor/platform/core.h> 31 constexpr
span() =
default;
33 constexpr
span(T* _d,
size_t _s)
38 constexpr T* data()
const {
42 constexpr
size_t size()
const {
46 constexpr T* begin()
const {
50 constexpr T* end()
const {
54 int compare(span v)
const {
55 const size_t rlen = std::min(size(), v.size());
57 std::char_traits<T>::compare(data(), v.data(), rlen);
61 }
else if (size() < v.size()) {
63 }
else if (size() > v.size()) {
75 template <
class CharT>
77 return lhs.compare(rhs) == 0;
86 template <
typename T,
size_t N>
105 return os.write(s.data(), s.size());
Definition: dyn_array.h:337
constexpr span< T > make_span(T(&s)[N])
Definition: span.h:87