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, size_t Size>
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.
When using this class you should use the helper make_map instead of constructing this class directly. For example: constexpr auto myMap = make_map<int, std::string_view>({{1, "one"}});
This class is useful for mapping enum values to strings that can be compile time checked. This also helps with heap usage.
Lookups have log(n) complexity if Key is comparable using std::less<>, otherwise it's linear.