Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Map.h File Reference
#include <algorithm>
#include <array>
#include <stdexcept>

Classes

class  CMap< Key, Value, Size >
 This class is designed to implement a constexpr version of std::map. The standard library std::map doesn't allow constexpr (and it doesn't look like it will be implemented in the future). This class utilizes std::array and std::pair as they allow constexpr. More...
 

Functions

template<typename Key , typename Value , std::size_t Size>
constexpr auto make_map (std::pair< Key, Value >(&&m)[Size]) -> CMap< Key, Value, Size >
 Use this helper when wanting to use CMap. This is needed to allow deducing the size of the map from the initializer list without needing to explicitly give the size of the map (similar to std::map).
 

Function Documentation

◆ make_map()

template<typename Key , typename Value , std::size_t Size>
constexpr auto make_map ( std::pair< Key, Value >(&&) m[Size]) -> CMap<Key, Value, Size>
constexpr

Use this helper when wanting to use CMap. This is needed to allow deducing the size of the map from the initializer list without needing to explicitly give the size of the map (similar to std::map).