#include <algorithm>
#include <array>
#include <stdexcept>
|
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...
|
|
|
template<typename Key , typename Value , std::size_t Size> |
consteval 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).
|
|
◆ make_map()
template<typename Key , typename Value , std::size_t Size>
auto make_map |
( |
std::pair< Key, Value >(&&) | m[Size] | ) |
-> CMap<Key, Value, Size>
|
|
consteval |
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).