StormByte 2.0.0
C++26 foundation of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Type::HasInsert Concept Reference

Associative StormByte::Type::Container that accepts insert of a value_type. More...

#include <StormByte/type_traits/containers.hxx>

Concept definition

template<typename C>
(
requires(std::remove_cvref_t<C>& c,
typename std::remove_cvref_t<C>::value_type const& v) {
c.insert(v);
} ||
requires(std::remove_cvref_t<C>& c,
typename std::remove_cvref_t<C>::value_type&& v) {
c.insert(std::move(v));
}
)
Has begin(), end() and value_type, and is not a StormByte::Type::String.
Definition containers.hxx:167
Associative StormByte::Type::Container that accepts insert of a value_type.
Definition containers.hxx:318
StormByte::Type::Container that publishes a nested key_type.
Definition containers.hxx:187
StormByte::Type::Container that publishes a nested mapped_type.
Definition containers.hxx:203

Detailed Description

Associative StormByte::Type::Container that accepts insert of a value_type.

Template Parameters
CContainer type (cv/ref ignored).

Requires StormByte::Type::HasKeyType or StormByte::Type::HasMappedType so positional insert(iterator, value) on std::vector does not satisfy this on any standard library. Accepts const-ref or rvalue insert.

Typical matches: std::map, std::set, std::unordered_map, std::unordered_set.