userver: userver/formats/parse/common_containers.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
common_containers.hpp File Reference

Detailed Description

Parsers and converters for Standard Library containers and std::optional.

Definition in file common_containers.hpp.

Go to the source code of this file.

#include <optional>
#include <type_traits>
#include <userver/formats/common/meta.hpp>
#include <userver/formats/parse/to.hpp>
#include <userver/utils/meta.hpp>
+ Include dependency graph for common_containers.hpp:
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  utils
 Utilities.
 
namespace  formats
 Value formats representation, parsing and serialization.
 
namespace  formats::parse
 Generic parsers and converters.
 

Functions

template<typename T , typename Value >
std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsRange< T > &&!meta::kIsMap< T > &&!std::is_same_v< T, boost::uuids::uuid > &&!std::is_convertible_v< T &, utils::impl::strong_typedef::StrongTypedefTag & >, T > formats::parse::Parse (const Value &value, To< T >)
 
template<typename T , typename Value >
std::enable_if_t< common::kIsFormatValue< Value > &&meta::kIsMap< T >, T > formats::parse::Parse (const Value &value, To< T >)
 
template<typename T , typename Value >
std::optional< decltype(Parse(std::declval< Value >(), To< T >{}))> formats::parse::Parse (const Value &value, To< std::optional< T > >)
 
template<class Value >
std::optional< std::nullptr_t > formats::parse::Parse (const Value &, To< std::optional< std::nullptr_t > >)
 
template<typename T , typename Value >
std::enable_if_t< meta::kIsRange< T > &&!meta::kIsMap< T > &&!std::is_same_v< T, boost::uuids::uuid > &&!std::is_convertible_v< T &, utils::impl::strong_typedef::StrongTypedefTag & >, T > formats::parse::Convert (const Value &value, To< T >)
 
template<typename T , typename Value >
std::enable_if_t< meta::kIsMap< T >, T > formats::parse::Convert (const Value &value, To< T >)
 
template<typename T , typename Value >
std::optional< T > formats::parse::Convert (const Value &value, To< std::optional< T > >)
 
template<class Value >
std::optional< std::nullptr_t > formats::parse::Convert (const Value &, To< std::optional< std::nullptr_t > >)