Table of Contents

A few weeks ago I gave another talk at my local C++ user group. We discussed recent “goodies” from C++ and tools that can increase productivity.

Intro  

In my post for the “C++ summary at the end of 2017” I mentioned that we could see a considerable improvement in the area of tooling for the language.

Most of the time we can hear that “C++ is hard”, parsing and analysing it is even harder… yet, maybe we reached the point where we can finally say “we have great tools”? Or at least we have decent tools!

Here are the main topics that I discussed during the talk:

Recent C++ Updates  

The talk was just a few days after Jacksonville’s C++ Committee Meeting. Therefore it was a good occasion for me to present some news about the current language status.

In the previous ISO meeting the Committee voted the following major things into the C++20 draft:

Albuquerque, November 2017

  • operator<=> (aka the spaceship operator) and library support for operator<=>
  • Range-based for with initializer
  • Apply [[nodiscard]] to the standard library - P0600R1
  • std::osyncstream
  • constexpr std::complex
  • constexpr algorithms
  • Floating point std::atomics
  • std::string/std::string_view .starts_with() and .ends_with()

And in the recent meeting we got:

  • Make typename optional in more places
  • [[likely]] , [[unlikely]] and [[no_unique_address]] - attributes
  • <version> header
  • Calendar and timezone library - big and nice addition to STL - you can find some news here:
  • syncstream manipulators for C++ Synchronized Buffered Ostream
  • span

More info: 2018 Jacksonville ISO C++ Committee Reddit Trip Report : cpp

Of course, we’re waiting for some more significant features like modules, concepts, ranges, networking, co-routines. The good news is that we can expect most of them… or core parts to be in C++20. So let’s wait, and I keep finger crossed for the committee: as they have to do a lot of work to “assemble” those delicate pieces together.

Tools  

In the second part, I did a demo of tools that I use or recently experimented.

On a daily basis, I work in Visual Studio, and I am pleased to see how the platform evolves. One point is, of course, keeping up with the standardization of the language. While moving to C++11 was a big problem for VS in the past, now the pace is amazing. The most blockers in the compiler were, as far as I know, rewritten and implementing C++17 is very close to being finished. VS 2017 was released in March 2017, and so far we had like six releases with useful updates.
And we can expect more good stuff in 2018: see this roadmap for VS.

Some great additions in VS:

  • Open Folder
  • Cmake support – 15.4 - so I don’t have to run Cmake to get a VS solution manually!
  • Clang compiler in VS!
  • Google and Boost Tests adapters since 15.5!

The next big thing is Clang and the tools that are built on top of Clang tooling. You can use Clang main tools like:

  • Format
  • Tidy
  • Analyzer

I especially like to use Clang Power Tools that are provided for Visual Studio.

But we have more products that are based on Clang:

Also, recently I got a chance to play with some unique products:

Conan

Conan looks like a fantastic package manager for C++. I posted some more thoughts on that in my recent post: pimpl vs Abstract Interface - a practical tutorial.

And:

Live++ - Molecular Matters

Live++ is a mind-blowing tool! In a matter of seconds you can recompile your code changes and immediately hot-patch the running binaries! It’s just one DLL that you need to load at the start of your app, and then you have access to this amazing feature. Very useful for testing and prototyping.

Live++ was released publicly on 27th March, and I got a chance to be a beta tester a few months earlier :)

The Slides  

Recent c++ goodies (March 2018) from Bartlomiej Filipek

Summary  

Of course, there are many more amazing tools that we can use for C++ today. During the presentation, I scratched only the surface of the topic.

What are your favourite tools for C++?
Do you agree with my opinion that currently for C++ we have quite decent tools?