Skip to content

MagicBowen/tlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLP : coding by template meta programming in C++11!


Introduction

TLP is a C++ template programming package including below:

  • Compile-time base type NullType, EmptyType, IntType, BoolType and algorithms on them;

  • Compile-time data structure TypeList;

  • Base algorithms on TypeList such as Length, Append, Erase, Replace, Unique...

  • Advanced algorithms on TypeList such as Any, All, Filter, Map, Fold, Sort...

  • Template meta programming utils such as IsEqual, IfThenElse, Print...

  • Useful traits tools such as IsConvertible, IsBaseOf and several lambda traits tools;

  • Tools for simplify defination of compile-time meta functions;

  • A pure compile-time test framework for C++ template meta programming;

  • Samples for using TLP:

    • Pure compile-time computing for counting triangles.
    • Gof visitor design pattern generated by TLP.
    • A DSL for implementation of state machine in table format.

To learn more about tlp and how to do C++ template meta programming, please visit the doc folder!

Install and Test

Get TLP

git clone [email protected]:magicbowen/tlp.git

Install TLP

cd tlp
mkdir build
cd build
cmake ..
make
sudo make install

Test TLP

Tlp use its own test framework for testing.

Just compile the testcases for testing. If all tests are compiled ok, it means that all tests pass.

cd tlp
mkdir build
cd build
cmake -DENABLE_TEST=1 ..
make
./test/tlp-test

Run Samples

Samples include examples for how to using TLP.

Compile and run all the samples:

cd tlp
mkdir build
cd build
cmake -DENABLE_SAMPLE=1 ..
make
./samples/triangle/triangle
./samples/fsm/fsm
./samples/visitor/visitor

Supported Platform:

  • [MAC OS X] supported
  • [Linux] supported
  • [Windows] not supported

Supported Compilers:

  • [CLANG] 3.4 or later.
  • [GCC] 4.8 or later.
  • [MSVC] not supported.

About

Template meta programming package by C++11.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published