StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
StormByte::Type::HasSubscript Concept Reference

Concept that checks whether a container supports operator[] for a given key/index type U. More...

#include <type_traits.hxx>

Concept definition

template<typename C, typename U>
concept StormByte::Type::HasSubscript = Container<C> && requires(C& c, U const& u) {
{ c[u] };
}
Concept to check if a type is a container (excluding strings).
Definition type_traits.hxx:96
Concept that checks whether a container supports operator[] for a given key/index type U.
Definition type_traits.hxx:132

Detailed Description

Concept that checks whether a container supports operator[] for a given key/index type U.

Example: HasSubscript<std::vector<int>, std::size_t> is true, and HasSubscript<std::map<Key, T>, Key> is also true because std::map provides operator[].