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

StormByte::Type::Container that accepts push_back 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.push_back(v);
} ||
requires(std::remove_cvref_t<C>& c,
typename std::remove_cvref_t<C>::value_type&& v) {
c.push_back(std::move(v));
}
)
Has begin(), end() and value_type, and is not a StormByte::Type::String.
Definition containers.hxx:167
StormByte::Type::Container that accepts push_back of a value_type.
Definition containers.hxx:260

Detailed Description

StormByte::Type::Container that accepts push_back of a value_type.

Template Parameters
CContainer type (cv/ref ignored).

True if either push_back(const value_type&) or push_back(value_type&&) is valid. The const-ref-only check rejected std::vector<std::unique_ptr<T>>.

Typical matches: std::vector, std::deque, std::list.