12Metaprogramming header-only library to obtain `constexpr` textual string representations of enum types and type names, including smart pointers and complex STL compound types.
13
14<small> <a href="index.html#libs">Back to list of all libraries</a> | <a href="modules.html" >See all modules</a> </small>
15<br>
16
17# Library `mrpt-typemeta`
18<small> [New in MRPT 2.0.0] </small>
19
20This library is part of MRPT but has no dependencies, so it can be installed
21in Debian-based systems with:
22
23 sudo apt install libmrpt-typemeta-dev
24
25## Example #1: compile-time type/struct/class names to strings
26Use mrpt::typemeta::TTypeName to extract a `constexpr` string with a compiler-independent
27representation of arbitrarily-complex types and STL containers.
28Note that creating objects from a run-time string representation of its type
29is handled in a different library (\ref mrpt_serialization_grp).
30
31See: \ref typemeta_TTypeName/test.cpp
32\snippet typemeta_TTypeName/test.cpp example typename
33Output:
34\include typemeta_TTypeName/console.out
35
36## Example #2: compile-time constexpr strings manipulation
37See: \ref typemeta_StaticString/test.cpp
38\snippet typemeta_StaticString/test.cpp example sstring