Interesting introduction to metaprogramming in the context of embedded systems.

http://odinthenerd.blogspot.com/2014/07/introduction-to-c-metaprogramming-part-1.html

Corresponding  C++ library with full static checking and abstractions to special function registers of embedded microcontrollers.

http://kvasir.io/