A C++14 header-only library that provides template metaprogramming datastructures with a focus on simplicity. Minimpl provides the following structures:
is_type, the metaprogramming type identity (similar to C++20'sstd::type_identity);type_pair, a pair of types (actually astd::tuplewith new operations);type_list, a list of types (actually astd::tuplewith new operations);type_map, a multimap of types (actually atype_listoftype_pairelements with operations on top).
Minimpl tries to respect the conventions used in the standard library as much as possible.
Here is a short usage example with type_list:
using l = type_list<char, double, int>;
constexpr size_t i_double = list_find<int, l>::value; // 2
constexpr bool l_is_a_list = is_list<l>::value; // true
using e1 = list_element_t<1, l>;
// alternatively, using e1 = typename list_element<1, l>::type;Minimpl uses the following header-only libraries:
- doctest - github repo - MIT license