One can generally count on Stack Overflow for excellent, high-quality C++ advice. Several C++ experts regularly contribute (I see Howard Hinnant frequently, for example). But Stack Overflow won’t always give you good answers. Here’s a case where a request for a simple solution generates 10+ responses with code ranging from ~10-30 lines – and in one case over 60 lines spread over two files! – that use macros, templates, proxy objects, and in more than a few cases have surprising and likely annoying side effects… for something that could have been solved with a single character. Yes. One… single… character. Continue Reading
Yet another regular feature I intend to have on this blog is “Code critique”. These will be posts where I focus on tutorials, books, papers, essays, articles, and blog posts about C++ that either advocate poor C++ practices or demonstrate horrible code, and take them apart critically. Continue Reading
A problem I come across rather frequently has to do with the fact that input in C++ requires a pre-existing variable of the correct type, which either has to be uninitialized or initialized to some “safe” value. There’s a third option, though, and it’s the topic of my first Tippet. Continue Reading
One of the things I hope to do from time to time on this blog is to offer short bits of code that solve relatively common programming problems, and that illustrate clever ways to use modern C++. These are combination tips and snippets, so I’ll be calling them “Tippets“.
You can submit Tippets, and if I like them, they will (eventually) be posted on the blog. You will be properly credited, of course.
I should probably qualify my bluster about all the code on this blog being C++14. While it is true that all of the code on this blog, unless otherwise specified, will be C++14, it is not likely that it will be properly displayed that way. I haven’t dug too deeply into it yet, but I don’t think the syntax-highlighting plugin I’m using supports C++14. In fact, I don’t think it even supports C++11. Continue Reading
So while I was wrestling with technical difficulties with my blog, I missed some huge news. According to a post by Herb Sutter on isocpp.org, C++14 is complete. Continue Reading
I have had some technical problems getting the blog up and running, but hopefully everything should be okay now. Look for actual content to begin sooner rather than later.
After a long hiatus, I’ve decided to start blogging about C++ again. Continue Reading