News

C++ Annotated: Dec – Feb edition

Today we are happy to share our next compilation of C++ news with you.

To subscribe to regular C++ annotated use this simple form and be the first to get the next edition!

C++ Annotated: Dec – Feb

In this edition:

  • Conferences
  • News & Stories
  • Releases

Conferences

Meeting C++

Meeting C++ 2015, the final C++ event in the year, was held in Berlin, December 4 & 5. Focused on Embedded Development this year, it was a great meetup for C++ developers from Europe and all over the world. Lots of interesting topics were covered, from the fantastic opening keynotes by Chandler Carruth about “Understanding Compiler Optimization” and James McNellis talking about “C++ Coroutines” to interesting lightning talks like Daniel Jasper’s about clang-tidy. There is a playlist available on YouTube with all the videos from the conference. Go on and check the topics you are mostly interested in!

meeting_cppBy the way, it was great to meet so many C++ developers at our booth at the conference. Thank you for coming up with lots of interesting questions. See you next year!

JetBrains C++ team in San Francisco in March

Our C++ team is up for a couple of big events in San Francisco area this March. We are happy to be the part of the world’s largest and longest-running professionals-only game industry event – GDC 2016 (join us at booth 1743). And in case you prefer local meetups – come and see us at San Francisco Bay Area C++ user group meetup (March 15) and Association of C/C++ Users’ Silicon Valley user group meetup (March 16).

News & Stories

News in brief

  • Android NDK switches to Clang and deprecates GCC; GDB updated to version 7.10.
  • Dmitri Nesteruk shows Cling (C++ interpreter) and Google Tests, while building a simple order book in C++. Watch the video on the YouTube.
  • Another survey from the Microsoft team is online. This time the team wants you to share your game development experience and talk about which languages, IDEs and game engines you use.
  • Rust published an RFC describing their ideas to modify the compiler in order to support IDEs.

CppCast

cppcast
CppCast, the first podcast by C++ developers for C++ developers, hosted by Rob Irving and Jason Turner, celebrates 1 year on air! Nearly 50 episodes published, covering the vast majority of C++ topics and introducing a great number of well-known guests: starting from Jon Kalb in episode 1 (he is back in episode 35 talking about CppCon), going further with Scott Meyers coming to episode 26 with a traditional topic about effective C++, then Andrei Alexandrescu about D, Eric Niebler about Ranges, Steve Klabnik about Rust, and many other fantastic guests. JetBrains was on air in episode 5 with Anastasia Kazakova talking about CLion (an upcoming C/C++ IDE at the time) and in episode 34 with Dmitri Nesteruk about High Performance Computing, CLion, ReSharper C++ and many other questions. Check the archive of episodes and let’s wish CppCast another great year!

Notes on C++ SFINAE

In his blog post about C++ SFINAE (Substitution failure is not an error), Bartlomiej Filipek tries to provide a short and clear explanation of what it is and when one can use it. Since the concept is not that easy, it’s important to understand the process of building the overload resolution set for a function call and how it works with SFINAE.
SFINAE
The simplified scheme from the blog post can help a lot, as can with the nice set of usage samples.

Visual C++ and C++17

vs_cppStephan T. Lavavej provides a detailed overview of all the new language features for C++ standard library and answers some frequently asked questions on the topic in the Visual C++ blog. The main point is that C++17 STL features have made their way into VS 2015 update 2. As usual, Microsoft has shared a nice graphical representation of the supported set of features so you can easily check if a particular standard feature is supported and in which version.

There is also an interesting FAQ section that explains how STL development impacts compiler features and why it makes sense to work on C++17 in STL ahead of finishing compiler features from the previous standards. And by the way, all these STL changes will be available in the Community Edition as well.

C++ in 2016

Jens Weller (from meetingcpp.com) in his annual post about the upcoming year collects important dates, lists C++ conferences, overviews tools trends, libraries and user group news for 2016. There are 8 big conferences, including ACCU in Bristol in spring, CppCon in Bellevue in fall, and Meeting C++ at the end of the year, and 3 C++ Committee meetings. Jens lists some free tools you should know about (like various clang sanitizers) and shares hopes for C++11 being “fully implemented on all major toolsets” during the year, especially with the libraries and tools moving towards C++11 more actively.

CLion: A Review of Feature Usage

CLion_cta_upd_800x320_Twitter_card-Trying to understand how our customers are using CLion, the team has looked back at 2015, the first year for CLion on air. With 45K active users per month and around 16% of them reporting their statistics, we’re getting a pretty good feel for the user experience. Some key facts include:

  • 40% of our users are on Linux, where Ubuntu 14 dominates as the main Linux distribution.
  • On Windows, MinGW 3.21 is the most popular choice.
  • ‘Go to declaration’ wins as the most popular navigation feature, View parameter info leads among code assistance features, and Rename is again on top of all refactorings.

See the full report for more numbers about popular plugins, VCS usage and other stats.

Swift vs C++

swiftcppAfter Apple open-sourced Swift (making it available not only on OS X, but on Ubuntu as well) and let developers contribute to Swift compiler and standard library, LLDB for Swift, and more, many OS X and Linux developers have joined the activity. There is even such a big initiative like IBM experimenting with Swift on Linux host environments. And seeing how some of the tasks that developers usually do using more classical languages like C++ are tested on Swift now, the question of performance comparison becomes essential.

Performance comparisons between Swift and C++ are appearing from time to time. Anthony Schmieder posts the results of Primate Labs tests in their blog regularly. The test is done on three problems with different targets: Mandelbrot (compute bound), GEMM (memory bound, sequential access of large arrays in small blocks), and FFT (memory bound, irregular access of large arrays). It’s interesting to see how the Swift language evolves in terms of performance and with every update inches closer to C++. The author also tries to understand the drawbacks and check some patches. Results from 2014 and 2015 are available, and we very much look forward to this year’s findings.

By the way, you can prepare and run some tests yourself, which is pretty easy now that CLion supports Swift in addition to C and C++. Find out more about the plugin.

libclang performance

libclangAnother performance story is about speeding up libclang on Windows. The story starts with… Qt Creator code completion! libclang is used to provide completion support, and with Qt Creator’s clang code model statistics you can compare the performance of such completion using various libclang instances.

The author, Cristian Adam, compared libclang 3.6.2 compiled with Visual C++ 2013, Visual C++ 2015, and libclang 3.7.0 compiled with Mingw-w64 GCC 5.3.0. As a result, the 6-second target was reached on the libclang built with Visual C++ 2015 64 bit and PGO optimized.

C++ package and dependency managers

There is a trend for a programming language/technologie to have a package and dependencies manager. C++ is not exception, though there is no standard one.

For Windows only it’s NuGet, while in cross-platform cases there is some variety. An interesting trend among all is growing usage of CMake.

First cross-platform tool to mention is biicode. Although the company behind it no longer exists, it is a great project (you can find it now in a repository on GitHub). Biicode made it possible to reuse any single source file from any given project in any other project you are developing (and it’s VCS independent), also providing a cloud to host your source code. So it was a cross-platform dependency manager and a hosting tool.

conanBiicode as a company is gone, but the contributors are still here. One of them is now working on Conan, a C/C++ dependencies and package manager. Growing out of a very similar idea, Conan still differs from biicode: it’s decentralized, allows working with pre-built binaries, and is independent from the build system (though it uses CMake a lot. Conan also provides a hosting service, which is free for OSS.

Of course there are many more options, like CPM, a CMake toolset based on Git, though without any hosting provided. Or Hunter – another cross-platform project based on CMake and using ExternalProject_Add function as its main instrument.

Having said all that, do you use a dependencies and package manager in your project? Which one? Let us know in the comments below.

Releases

Qt Creator

qtIn the middle of December Qt Creator 3.6.0 was released. The most interesting C++ related change is Clang Fix-its which is now integrated into Qt Creator’s refactoring actions. They’ve also added an editor for UML-style diagrams, and improved Qt Quick Designer and QMake configuration type.

Qt Roadmap for 2016 was published in February, highlighting its focus of development for this year. There are changes in the open source licensing that could be interesting (introducing LGPLv3), wider usage of C++11 in modules and Qt libraries planned, and Advanced Profiling, Static Analyzer and Qt Quick Designer features making their way into the open source version of Qt Creator 4.0.

QuantLib

quantlibQuantLib, an open-source library for quantitative finance, published a new release in November along with a bug fix update in January. At the same time Dmitri Nesteruk, JetBrains developer advocate, started working on porting QuantLib, which is originally configured as a Visual Studio solution, to CMake model. He posted about it in December (the post also includes some tips about building Boost on Windows) and then provided a pull request that was accepted to QuantLib master, adding initial CMake support to it.

CLion public preview

CLion_400x400_Twitter_logo_white
A new CLion version is going to be released in early spring and now the free Public Preview is available. It finally supports variadic templates and provides proper auto-import for STL symbols, as well as makes generation actions more accurate and their behavior a lot clearer. There are also Python and Swift plugins, and a new ‘attach to local process’ feature for more effective debugging.

image description