Before the acceptance of Concepts Lite TS into C++17, there was a lot of effort out there in the community to make a C++11/14 compatible implementation of Concepts, at least an emulation wrapping the usual SFINAE tricks. Concepts provide nice syntax for concept definition type constraining. No more SFINAE! (I... [Read More]
Resurce Handlers and Value Semantics
Before C++11, implementing correct value semantics for a class was a complete pain: You must deal with the constructor, copy constructor, (copy) assignment operator, and then the destructor. Also you had to take some care since those semantics are tightly coupled between that special member functions, so the compiler may... [Read More]
RAII for API, Naked Ptrs for Internals?
It’s well stablished that having raw pointers as part of a C++ API is not a good practice since it’s not clear who (The user or the API internals) manages the resource. Consider: [Read More]
I find C++ template metaprogramming so funny. Maybe it’s the feel of being hacking the compiler, maybe is just a way to improve my functional programming skills. I’m not sure. But the fact is that I do meta on C++ a lot, and I’m actually used to the way it... [Read More]
Haskellizing C++ template metaprogramming
If you followed my crazy tales about the Haskell Metaphor you may think I have a great problem with myself and the way I waste my free time… I have been doing intensive C++ template metaprogramming for up to three years, developing my own tmp library called Turbo, with the... [Read More]