https://github.com/sztomi/cpp-static-init-block
Emulating the static initialization blocks of Java in C++
https://github.com/sztomi/cpp-static-init-block
Last synced: 26 days ago
JSON representation
Emulating the static initialization blocks of Java in C++
- Host: GitHub
- URL: https://github.com/sztomi/cpp-static-init-block
- Owner: sztomi
- License: mit
- Created: 2014-03-09T16:26:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-09T16:26:46.000Z (about 11 years ago)
- Last Synced: 2025-03-31T00:41:18.260Z (2 months ago)
- Language: C++
- Size: 97.7 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Implementing a code generator with libclang
This repository contains the full source code for my article about
[emulating Java static initialization blocks in C++](http://szelei.me/cpp-static-init-block).
Please refer to the article for details.## Usage
To use this in your own project, simply include `src/static_init.h` and you are good to go.
## Building
The following is required to build this project:
* A C++11 compliant compiler (or reasonably compliant, probably even MSVC 2010 and older will
work.)
* Premake4 (http://industriousone.com/premake)(but actually this is just a header-only library and a couple of files for demonstration).
To build the project on a \*nix system, run ./build.sh