userver: userver/utils/span.hpp File Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
span.hpp File Reference

Your opinion will help to improve our service

Leave a feedback >

Detailed Description

A polyfill for std::span from C++20.

Definition in file span.hpp.

Go to the source code of this file.

#include <cstddef>
#include <iterator>
#include <type_traits>
#include <userver/utils/assert.hpp>
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::span< T >
 A polyfill for std::span from C++20. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename Container >
 utils::span (Container &&cont) -> span< std::remove_reference_t< decltype(*std::begin(cont))> >
 
template<typename T >
span< const std::byte > utils::as_bytes (span< T > s) noexcept
 A polyfill for std::as_bytes from C++20.
 
template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
span< std::byte > utils::as_writable_bytes (span< T > s) noexcept
 A polyfill for std::as_writable_bytes from C++20.