RSSAmplifier

Blog

C++ Rocks!

This is a resource for developers writing modern C++, with a focus on the latest revisions of the language: C++11 and C++14.

cpprocks.comRSS feed ↗10 posts

Latest posts

JetBrains CLion C++ IDE First Impressions

This post describes my first impressions from taking the new JetBrains CLion C++ IDE (currently in alpha) for a spin. I’ve been a loyal user of another IDE made by JetBrains - RubyMine, which I’ve been using for Ruby on Rails and Node.js projects. This IDE is one of the best that I’ve used, so I was excited to hear about the public release of an alpha version of their C++ IDE. It was particularly…

Clang edition of the C++11/14 Rocks book

Do you use Clang to compile C++? Would you like to know all about the C++11 and C++14 language features it supports? You can read about them in the new edition of my C++11/14 Rocks book tailored to Clang. I carefully collected everything you need into one short, clear book. Clang already supports all of these C++14 features as of version 3.4: Return type deduction for regular functions Generic…

Spotlight on libraries relying on C++14

While working on the C++14 coverage for the Clang edition of my book , I’m also taking a look at the C++14 code in the wild, and I thought I’d write up what I’ve found. There are, of course, implementations of the C++ standard library which by necessity rely on C++14 features. libc++ is complete with regards to C++14, and libstdc++ & Microsoft’s implementation have implemented the changes…

What if C++ looked more like Python or CoffeeScript?

I’m quite fond of languages with minimal syntax. Not only it is easier to read and write code in these languages - it also provides an opportunity to reduce errors (both at compile time and at run time), when you consider that every character in a program has the potential to cause an error due to being misread or misplaced. In addition, long, dense lines of code littered with punctuation increase…

An overview of C++14 language features

In this post, I’m going to highlight some of the new language features in the draft of the C++14 standard. This is an excerpt from my book C++11 Rocks: VS2013 Edition . I looked at the level of C++14 support in different compilers in a previous post . Return type deduction for functions The compiler will be able to deduce the return type of functions: auto square ( int n ) { return n * n ; } To…

C++11/14 compiler and library shootout

It’s been almost a year since my last comparison of C++11 support across different compilers, so I decided to take a break from working on my book about C++11/14 features in VS2013 , and see how things have changed. Once again, I’d like to see how different compilers stack up based on the documentation for the pre-release versions of these compilers. I’ve also included some of the current released…

44 C++11 bugs fixed in Visual Studio 2013

The following bugs which I described in the VS2012 edition of my book, C++11 Rocks , have been fixed in Visual Studio 2013, so you have more freedom to use C++11 features as they were intended to be used. If you used workarounds for these bugs, now you can remove them and clean up your code! However, as I was researching VS2013, I was disappointed to learn that many bugs migrated from VS2012…

10 new C++11 features in Visual Studio 2013

The Visual Studio 2013 C++ compiler has a number of new C++11 features. I’d like to give you a quick overview of these features using examples from the upcoming VS2013 edition of my book, C++11 Rocks . 1. Variadic templates Before C++11, if you wanted a template which could work with a variable number of type (or non-type) parameters, you had no choice but to limit such a template to a fixed…

C++11 concurrency cheatsheet

Parallel execution. It’s where programming is shifting - slowly but inexorably - and, of course, C++11 is on the concurrency bandwagon. Futures/promises, threads, condition variables and so on - it’s all part of the standard library. I thought it would be handy to have a summary of the concurrency classes and their methods on a single page for quick reference. So I made a cheatsheet: Download C++…

C++11 compiler support shootout: Visual Studio, GCC, Clang, Intel

It’s been more than half a year since my last comparison of the C++11 support across different compilers. This time I’d like to see how different compilers stack up based on the documentation for the pre-release versions of these compilers. The next release of GCC is 4.8 and the upcoming version of Clang is 3.3. If you use Visual Studio 2012, you can install an experimental CTP update released in…