https://github.com/pseudomanifold/typeswitch
Type switch template meta-programming class using C++11
https://github.com/pseudomanifold/typeswitch
Last synced: 3 months ago
JSON representation
Type switch template meta-programming class using C++11
- Host: GitHub
- URL: https://github.com/pseudomanifold/typeswitch
- Owner: Pseudomanifold
- License: mit
- Created: 2015-04-19T11:50:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-19T13:03:07.000Z (over 10 years ago)
- Last Synced: 2025-05-15T16:52:06.183Z (5 months ago)
- Language: C++
- Size: 117 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains an example implementation of a simple type list
and a simple type switch class, using only C++11. I have provided a
longer explanation [in a blog
post](http://bastian.rieck.ru/blog/posts/2015/type_lists_and_switches).# Building it
$ mkdir build
$ cd build
$ cmake ../
$ make# Examples
$ ./type_list_demo
The type list has a length of 4
The first type is c
The second type is s
The third type is i
The fourth type is l$ ./type_switch_demo
Called with the following type: c
Called with the following type: b
Oops, this type does not exist: Index is out of rangeNothing too spectacular.