An open API service indexing awesome lists of open source software.

https://github.com/tumdum/either_ptr


https://github.com/tumdum/either_ptr

cpp optimization

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

tmd::either_ptr is type similar to boost::variant in concept. It differs
in few ways:
- it is always the same size as void*
- it allows for A to be the same type as B
- it can only store types with alignment of at least 2. To be precise it
requires passed pointer to have lowest bit set to zero.

To use it's enough to copy either_ptr.hpp and LICENSE files to your project.