EXOTIC.lyst is a high-performance, header-only C++ library for managing and manipulating typelists. Part of the EXOTIC collection of modern C++ libraries, it provides a full suite of compile-time type operations optimized for template metaprogramming (TMP).
Compile-time typelist operations:
at, front, backpush_front, push_back, replace, pop_front, pop_backcount, index_of, containsEXOTIC::UtilitySimply include the header in your project:
#include "EXOTIC.lyst.h"
No compilation or linking steps are required, as this is a header-only library.
A typelist is a compile-time list of types:
using MyTypes = EXOTIC::Lyst::typelist<int, float, double>;
Check if a typelist is empty:
static_assert(!EXOTIC::Lyst::empty_v<MyTypes>, "Typelist should not be empty");
Access elements:
using FirstType = EXOTIC::Lyst::front_t<MyTypes>; // int
using LastType = EXOTIC::Lyst::back_t<MyTypes>; // double
using SecondType = EXOTIC::Lyst::at_t<1, MyTypes>; // float
Modify typelists at compile time:
// Push and pop types
using Extended = EXOTIC::Lyst::push_back_t<char, MyTypes>; // int, float, double, char
using Shorter = EXOTIC::Lyst::pop_front_t<Extended>; // float, double, char
// Replace a type
using Replaced = EXOTIC::Lyst::replace_t<1, long, MyTypes>; // int, long, double
// Filter types based on a predicate
template<typename T>
struct is_integral_type : EXOTIC::Utility::is_same<T, int>::type {};
using Filtered = EXOTIC::Lyst::filter_t<is_integral_type, MyTypes>; // int
// Transform types
template<typename T>
struct add_pointer { using type = T*; };
using PointerTypes = EXOTIC::Lyst::transform_t<add_pointer, MyTypes>; // int*, float*, double*
Other available operations:
concat_t<L1, L2> – concatenate two typelistsremove_first_t<T, L> – remove the first occurrence of a typeremove_all_t<T, L> – remove all occurrences of a typereverse_t<L> – reverse the order of a typelistcount_v<T, L> – count how many times a type appearscontains_v<T, L> – check if a type exists in a typelistindex_of_v<T, L> – get the compile-time index of a typeEXOTIC::Utility provides TMP and type trait helpers:
size_v<L> – get typelist sizeis_same_v<T, U> – check if two types are the sameis_void_v<T> / is_not_void_v<T> – check for void typesdependent_false_v<T> – helper for static_assert in templatesThese utilities enable safer, more readable TMP code.
This library is licensed under the Boost Software License, Version 1.0. See LICENSE for details.
Félix-Olivier Dumas GitHub: unrays/Lyst Version: 1.0.0 Last Updated: January 15, 2026
I had zero experience with typelists before this. I built Lyst in 5 intense days and am proud of the work.