Relative Content

Tag Archive for c++metaprogramming

C++ compile-time dependency injection

How to implement compile-time dependency injection in C++ (like in boost-ext/di)? May be here’s some metaprogramming magic described by another acronym (like SFINAE)? Or it’s just a smart combination of well-known metaprogramming techniques?

Getting object member at compile time

I’d like to make a compile-time map in which I’ll connect a number to a member of a class. Then return member of a class from a function at compile-time.