Metaprogramming, template variables and concepts.
More...
#include <iosfwd>
#include <iterator>
#include <optional>
#include <type_traits>
#include <vector>
#include <userver/utils/meta_light.hpp>
Go to the source code of this file.
|
template<typename T > |
auto | meta::Inserter (T &container) |
| Returns default inserter for a container. More...
|
|
Metaprogramming, template variables and concepts.
Definition in file meta.hpp.
◆ MapKeyType
template<typename T >
using meta::MapKeyType = typedef DetectedType<impl::KeyType, T> |
◆ MapValueType
template<typename T >
using meta::MapValueType = typedef DetectedType<impl::MappedType, T> |
◆ RangeValueType
template<typename T >
using meta::RangeValueType = typedef DetectedType<impl::RangeValueType, T> |
◆ Inserter()
template<typename T >
auto meta::Inserter |
( |
T & |
container | ) |
|
Returns default inserter for a container.
Definition at line 156 of file meta.hpp.
◆ kIsEqualityComparable
template<typename T , typename U = T>
constexpr bool meta::kIsEqualityComparable |
|
inlineconstexpr |
Initial value:=
std::is_same_v<DetectedType<impl::EqualityComparisonResult, T, U>, bool>
Definition at line 129 of file meta.hpp.
◆ kIsFixedSizeContainer
template<typename T >
constexpr bool meta::kIsFixedSizeContainer |
|
inlineconstexpr |
Initial value:=
impl::IsFixedSizeContainer<T>::value
Check if a container has fixed size (e.g. std::array)
Definition at line 151 of file meta.hpp.
◆ kIsMap
template<typename T >
constexpr bool meta::kIsMap |
|
inlineconstexpr |
Initial value:
Returns true if T is an ordered or unordered map or multimap.
Definition at line 98 of file meta.hpp.
◆ kIsOptional
template<typename T >
constexpr bool meta::kIsOptional = kIsInstantiationOf<std::optional, T> |
|
inlineconstexpr |
◆ kIsOstreamWritable
template<typename T >
constexpr bool meta::kIsOstreamWritable |
|
inlineconstexpr |
Initial value:=
std::is_same_v<DetectedType<impl::OstreamWriteResult, T>, std::ostream&>
Definition at line 125 of file meta.hpp.
◆ kIsPushBackable
template<typename T >
constexpr bool meta::kIsPushBackable = kIsDetected<impl::PushBackResult, T> |
|
inlineconstexpr |
Check if a container has 'push_back'.
Definition at line 147 of file meta.hpp.
◆ kIsRange
template<typename T >
constexpr bool meta::kIsRange = kIsDetected<impl::IsRange, T> |
|
inlineconstexpr |
◆ kIsRecursiveRange
template<typename T >
constexpr bool meta::kIsRecursiveRange |
|
inlineconstexpr |
Initial value:=
std::is_same_v<DetectedType<impl::RangeValueType, T>, T>
Definition at line 118 of file meta.hpp.
◆ kIsReservable
template<typename T >
constexpr bool meta::kIsReservable = kIsDetected<impl::ReserveResult, T> |
|
inlineconstexpr |
Check if a container has reserve
Definition at line 143 of file meta.hpp.
◆ kIsSizable
template<typename T >
constexpr bool meta::kIsSizable = kIsDetected<impl::IsSizable, T> |
|
inlineconstexpr |
Check if std::size is applicable to container.
Definition at line 139 of file meta.hpp.
◆ kIsStdHashable
template<typename T >
constexpr bool meta::kIsStdHashable |
|
inlineconstexpr |
Initial value:=
std::is_same_v<DetectedType<impl::StdHashResult, T>, std::size_t> &&
kIsEqualityComparable<T>
Definition at line 133 of file meta.hpp.
◆ kIsUniqueMap
template<typename T >
constexpr bool meta::kIsUniqueMap |
|
inlineconstexpr |
Initial value:=
kIsMap<T> &&
kIsDetected<impl::SubscriptOperatorResult,
T>
Returns true if T is a map (but not a multimap!)
Definition at line 104 of file meta.hpp.
◆ kIsVector
template<typename T >
constexpr bool meta::kIsVector = kIsInstantiationOf<std::vector, T> |
|
inlineconstexpr |