As I continue my work on Effective Modern C++, I'm pleased to see that the pile of stuff I need to read or reread (or reread again), because it might be useful in the book, is getting smaller. Today I finished my second full draft of my chapter on rvalue references, move semantics, and perfect forwarding, and part of that process was reviewing some interesting blog posts that appeared at Flaming Dangerzone. All address std::enable_if, in one way or another. My first draft of the chapter discussed std::enable_if, but for the second draft, I was pleased to get rid of the material, because (1) it's hard to explain, (2) I think it's too advanced and specialized for the kind of book I want to produce, and (3) I think I found a better way to solve the problem I'd been using std::enable_if for. (To be more precise, I believe that a better way was suggested by one of the technical reviewers of the initial draft of that chapter.)
Book or no book, the blog posts were interesting in a "template metaprogramming makes my head hurt" kind of way, so if you like that kind of headache, would like to better understand std::enable_if and its applications, and have not seen these articles, I recommend them:
Remastered enable_if
To SFINAE or not to SFINAE
Beating overload resolution into submission
Scott
Monday, April 21, 2014
Monday, April 14, 2014
"Hello, World" Podcast with Me
Shawn Wildermuth's Hello World Podcast consists of interviews with developers, authors, speakers, etc., about their programming roots, and recently he asked me to participate. If, for some inexplicable reason, you're interested in hearing about how I played teletype-based computer games in the early 1970s, how I took umbrage when told my programming resembled FORTRAN when it should have been BASIC, and how I came to write Effective C++, have a listen.
Scott
Subscribe to:
Posts (Atom)