-
Notifications
You must be signed in to change notification settings - Fork 2
Home
noe edited this page Jan 30, 2013
·
6 revisions
Welcome to the gtplib wiki!
gtplib is a header-only C++ library implementing the Go Text Protocol. The specification of the protocol itself can be found here.
In order to use it, you just have to create a class that handles GTP commands and wire it like this:
TODO: piece of code showing how to use it
It uses the following features from C++11:
- strongly-typed enums (i.e. 'enum class').
- type aliases (i.e.new usage of keyword 'using').
- for each loops.
- auto.
- variadic templates.
- tuples.
- atomics.
- initializer lists.
The template metaprogramming idioms used are:
- Normal template specialization for static dispatching and branching.
- int-to-type to map GTP command type enum values to types.
- type traits to store GTP commands metainfo.