TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
Loading...
Searching...
No Matches
tec::is_map< T, typename > Struct Template Reference

Trait to detect associative containers that behave like std::unordered_map / std::unordered_set. More...

#include <tec_container.hpp>

Inheritance diagram for tec::is_map< T, typename >:

Detailed Description

template<typename T, typename = void>
struct tec::is_map< T, typename >

Trait to detect associative containers that behave like std::unordered_map / std::unordered_set.

In addition to the usual container interface (begin/end/size), this trait requires the presence of bucket_count(), which is specific to unordered associative containers in the standard library.

It will be true for:

  • std::unordered_map
  • std::unordered_multimap
  • std::unordered_set
  • std::unordered_multiset

It will be false for ordered maps (std::map) and for non-unordered containers.

Template Parameters
TType to check
<unnamed>SFINAE parameter used for specialization

The documentation for this struct was generated from the following file: