The mtl or by its full name the Modern Template Library is a C++ 17 header-only library that provides everything you ever wanted but the C++ standard library is missing. It provides a lot of functionality that other programming languages include by default in their standard libraries.
For a quick overview of what mtl provides you can check the list of classes and functions.
The mtl-examples repository contains detailed examples that teach you how to use the mtl in the most effective way. Read the detailed comments of each example to learn the best usage patterns and common mistakes to avoid.
Instead of the detailed examples from this repository you may wish to check some quick examples that are only few lines long from here. All quick examples are also included in this repository with added comments for each line.
For mtl documentation refer to the documentation.
The simplest example of all, hello world. Using mtl to print something to the console is very easy.
#include "mtl/console.hpp"
int main()
{
mtl::console::println("Hello World");
}
- For mtl-examples you need a C++ 17 compiler. For compiler compatibility refer to the compiler documentation.
- For mtl-examples you need CMake.
Open the terminal and navigate to the root of mtl-examples :
mkdir build
cd build
cmake ..
cmake --build .
Open x64 Native Tools Command Prompt for VS 2019
(vcvars64.bat
) to the root of mtl-examples :
mkdir build
cd build
cmake ..
cmake --build .
The mtl-examples is licensed under the MIT license.
For third party licenses check ThirdPartyNotices.
mtl by Michael Trikergiotis 2016-2021
mtl-examples by Michael Trikergiotis 2020-2021