XTL is a series of C++ template metaprogramming patterns, idioms, algorithms and libraries that solve a variety of programming tasks. It supplements, extends and cooperates with the STL by providing some frequently used components that are otherwise absent from the standard.

Programming language: C++
License: Boost Software License 1.0

eXtended Template Library alternatives and similar libraries

Based on the "Concurrency" category.
Alternatively, view eXtended Template Library alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of eXtended Template Library or a related project?

Add another 'Concurrency' Library


eXtended Template Library

Open Hub Open Hub project report
Linux Travis
Windows AppVeyor
Coverage Coveralls
Technical Debt SonarQube Tech Debt
Code Quality SonarQube Quality Gate
License Boost License
Contribute with Gratipay Gratipay User
Contribute with Beerpay Beerpay

View the documentation online at http://djmott.github.io/xtl

View the github project at https://github.com/djmott/xtl

XTL is a series of C++ template metaprogramming patterns, idioms, algorithms and libraries that solve a variety of programming tasks. It supplements, extends and cooperates with the STL by providing some frequently used components that are otherwise absent from the standard. A short list of some of the more notable headers:

Header Description
callback.hpp single producer notifies multiple consumers of an event
dynamic_library.hpp load and invoke methods in a dynamic library
parse.hpp text parsing and AST generation
socket.hpp general purpose socket communication
source_location.hpp maintains info about locations within source code
spin_lock.hpp simple user mode spin lock based on std::atomic
string.hpp advanced and common string handling
tuple.hpp manipulate and generate tuples
unique_id.hpp global unique identifier / universal unique identifier data type
var.hpp multi-type variant using type-erasure

Getting started

XTL works with modern C++11 compilers and has been tested with MinGW, GCC, Intel C++, Cygwin and Microsoft Visual C++. The library can be used out-of-the-box in many cases by simply including the desired header since most components are header-only. A few components require linking to a run-time component so they will need to be compiled.


  • CMake is required to configure
  • libiconv is optional for unicode support on Posix platforms.
  • libuuid is optional for UUID/GUID support on Posix plaforms. (This library has bounced around to several locations over the years. Some documentation says it's included in modern Linux kernel code while others say it's included in the e2fsprogs package. Most modern Linux distros support some version in their respective package managers.)


XTL is hosted on GitHub and is available at http://www.github.io/djmott/xtl Checkout the repo with git:

git clone https://github.com/djmott/xtl.git


For the most part XTL is a 'header-only' library so compilation isn't necessary. None the less, it must be configured for use with the compiler and operating system with CMake. From within the top level directory:

mkdir build
cd build
cmake ..

The compilation step is not always necessary depending on the required components that will be used. The method used to compile the run-time code is platform, toolchain and CMake configuration specific. For Linux, Cygwin and MinGW make files just run make.


Several configuration options are available during configuration with CMake. For most purposes the default configuration should work fine. Applications should add the include folder to the search path. The configuration with CMake detects the compiler toolchain and target operating system then produces the primary include file. For most applications just including the project header will go a long way:

 #include <xtd/xtd.hpp>


XTL uses the Google Test framework for unit tests and system test. From within the build directory:

make unit_tests

The unit tests and system tests are contained in the same resulting binary at tests/unit_tests. The coverage_tests build target is only available for GCC:

make coverage_tests

This will produce the binary tests/coverage_tests which is identical to the tests/unit_tests binary but has additional instrumenting enabled for gcov.


Online documentation is available at https://djmott.github.io/xtl and Doxygen is used to generate offline documentation. The code is fairly well marked up for doxygen generation. After the project has been configured with CMake build with documentation with:

make docs

This will extract the source comments and generate nice documentation in the docs/html folder. Also available is the wiki

Feedback and Issues

Submit a ticket on GitHub if a bug is found. Effort will be made to fix it ASAP.


Contributions are appreciated. To contribute monitarilty, toss me some cash on Beerpay or Gratipay To contirube code, fork the project, add some code and submit a pull request. In general, contributions should:

  • Clear around %80 in code coverage tests
  • Pass SonarQube quality gateway
  • Pass unit and system tests
  • Pass tests through ValGrind memcheck or some other dynamic analysis with no resource leaks or other significant issues


XTL is copyright by David Mott and licensed under the Boost Version 1.0 license agreement. See [LICENSE.md](LICENSE.md) or http://www.boost.org/LICENSE_1_0.txt for license details.

Support on Beerpay

Hey dude! Help me out for a couple of :beers:!

Beerpay Beerpay

*Note that all licence references and agreements mentioned in the eXtended Template Library README section above are relevant to that project's source code only.