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 asLength
,Append
,Erase
,Replace
,Unique
... -
Advanced algorithms on
TypeList
such asAny
,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!
git clone [email protected]:magicbowen/tlp.git
cd tlp
mkdir build
cd build
cmake ..
make
sudo make install
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
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
- [MAC OS X] supported
- [Linux] supported
- [Windows] not supported
- [CLANG] 3.4 or later.
- [GCC] 4.8 or later.
- [MSVC] not supported.