Skip to content

Instantly share code, notes, and snippets.

View eyalroz's full-sized avatar

Eyal Rozenberg eyalroz

View GitHub Profile
@eyalroz
eyalroz / static_block.h
Last active March 20, 2019 12:19
A static block implementation in almost-C C++
/**
* static_block.h
*
* An implementation of a Java-style static block, in C++ (and potentially a
* GCC/clang extension to avoid warnings). Almost, but not quite, valid C.
* Partially inspired by Andrei Alexandrescu's Scope Guard and
* discussions on stackoverflow.com
*
* By Eyal Rozenberg <eyalroz@technion.ac.il>
*