|
TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
|
Generic container and map traits. More...
Go to the source code of this file.
Classes | |
| struct | tec::is_container< T, typename > |
| Trait to detect whether a type behaves like a standard container. More... | |
| struct | tec::is_container< T, std::void_t< decltype(std::declval< T >().begin()), decltype(std::declval< T >().end()), decltype(std::declval< T >().size()) > > |
| Specialization that activates when T has begin(), end(), and size(). More... | |
| struct | tec::is_map< T, typename > |
| Trait to detect associative containers that behave like std::unordered_map / std::unordered_set. More... | |
| struct | tec::is_map< T, std::void_t< decltype(std::declval< T >().begin()), decltype(std::declval< T >().end()), decltype(std::declval< T >().size()), decltype(std::declval< T >().bucket_count()) > > |
| Specialization that activates when T has the unordered-map-like interface. More... | |
Variables | |
| template<typename T > | |
| constexpr bool | tec::is_container_v = is_container<T>::value |
| Convenience variable template for checking container-ness. | |
| template<typename T > | |
| constexpr bool | tec::is_map_v = is_map<T>::value |
| Convenience variable template for checking unordered-map-like types. | |
Generic container and map traits.
|
inlineconstexpr |
Convenience variable template for checking container-ness.
Usage:
| T | Type to test |
|
inlineconstexpr |
Convenience variable template for checking unordered-map-like types.
Usage:
| T | Type to test |