qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::is_container< T > Struct Template Reference

Type trait to check if a type T is a container. More...

#include <type_traits.h>

Inheritance diagram for qb::is_container< T >:
Collaboration diagram for qb::is_container< T >:

Detailed Description

template<typename T>
struct qb::is_container< T >

Type trait to check if a type T is a container.

A type T is considered a container if it has a const_iterator nested type, and begin() and end() member functions that return this const_iterator. Specializations exist for C-style arrays, std::valarray, std::pair, and std::tuple.

Template Parameters
TThe type to check.
Returns
std::true_type if T is a container, std::false_type otherwise.