enricorossi.org

Enrico Rossi


Articles tagged with example

c++ create a catalog of static functions

Tags: tips, notes, c++, example, functions

Create a catalog of static functions so any class can register its own functions into the catalog and later all the same functions in the catalog can be called.

ex. Register all the suspend() and resume() functions for all the classes created.

A working example (available on github).

/* Bind functions …
Read more...

c++ template derivate notes

Tags: c++, derivate, example, notes, template, tips

A working example.

/* Derivate Templates in C++, a working example.

              DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is …
Read more...