Software Engineering

random thoughts

Renameable Namespaces using the Preprocessor

Renameable Namespaces using the Preprocessor

Dynamic Object in C++

You can find my implementation at https://github.com/toeb/cppdynamic it is licensed under the MIT license. I’d be happy for feedback and or optimizations :) Dynamic object are useful, especially in rapid prototyping, non-performance critical situations, and situations in which data/functions -bags are needed (non schema specific data). Also when serializing and deserializing dynamic objects can be a very valuable asset. Dynamic programming languages inherently support this. e.g. var obj = {}; obj.

dynamically calling `any` thing in C++

Extending upon boost’s any class which stores a type and a void ptr to any type of value, I created a callable version were you can assign any function, lambda, memberfunction etc. to the any and call it dynamically. This is a basic and important step for runtime reflection which I’m currently working on. Tell me if you like what I did and if you have any improvements. You can look at the running example at ideone