The Week in C++ for May 14th-20th

This week in C++:

The Week in C++ for May 7th-13th

This week in C++:

  • Boost 1.61.0 has been released. New libraries are Compute for parallel/GPU computing, DLL for cross-platform manipulation access to shared libraries, Hana for modern C++ metaprogramming, and Metaparse for compile-time parsers for an embedded DSL.
  • The library formerly known as C++ Format (cppformat) is now known simply as fmt. Fmt is an open-source formatting library for C++ that can be used as a typesafe alternative to printf or as a fast alternative to iostreams. (HT: ISO C++ blog)
  • C++ Weekly Episode 9: std::future Quick-start: In this episode we get a very fast quick-start to what std::future is and how to use std::async to run a function in another thread. (HT: ISO C++ blog)
  • Fabien Giesen has written a brief article explaining why compilers exploit undefined signed overflow. (HT: LLVM Weekly)
  • LLVM Weekly #123 links to discussions on the LLVM Code of Conduct and other recent happenings in the LLVM/clang community.
  • Qt Creator 4.0.0 released

C++11/14/17 Features in Visual Studio 2015

Stephan T. Lavavej has posted a list of C++11, C++14, and C++17 features in Visual Studio 2015. Overall, the support looks pretty good and clearly the compiler team is rapidly evolving the product to improve standards conformance with each release. Not only are they tracking C++11 and C++14 standards well, they are proactively tracking C++17-to-be features as well. To summarize:

The Core Language

  • C++11 core language features are complete, except for: expression SFINAE and C99 preprocessor support is partial
  • C++14 core language features are complete, except for: variable templates, extended constexpr, and non-static data member initializers for aggregates.
  • C++17-so-far core language features are complete, except for: terse static_assert, nested namespace definitions and fixing qualification conversions.

The Standard Library

  • The C99 Standard Library implementation is complete, except for tgmath.h (which is irrelevant in C++) and the CX_LIMITED_RANGE/FP_CONTRACT pragma macros.
  • The C++11 Standard Library implementation is complete.
  • The C++14 Standard Library implementation is complete, except for Expression SFINAE in result_of/std::function, plus 11 more Library Issues.
  • The C++17-so-far Standard Library implementation is complete, except for pair/tuple improvements and untimed shared_mutex, plus 10 Library Issues.

Please see the linked post for the full details. Stephan has linked every feature to either documentation or a standards proposal that explains it.

JetBrains Releases CLion 1.0

JetBrains has released CLion 1.0, a cross-platform integrated IDE for C++. CLion uses the same IDE framework that is the basis for IntelliJ, one of the best IDEs for Java. CLion provides an excellent editor with strong code navigation features and excellent refactoring support. For C++ development, CLion offers the best refactoring support around which is no surprise given the strong refactoring support for Java in IntelliJ.

If you are a C++ developer using Linux or MacOS, I strongly recommend you evaluate CLion. Windows developers should look at ReSharper C++, also from JetBrains.

Oral History of Bjarne Stroustrup

The Computer History Museum has named Bjarne Stroustrup, the creator of C++, a 2015 Computer History Museum Fellow. The Museum just published an oral history of Bjarne Stroustrup as well.

Stroustrup: What is that string manipulation pattern matching language from the sixties?

McJones: SNOBOL?

Stroustrup: SNOBOL. That’s right. I remember finding SNOBOL really interesting and useful. What I’ll
call a formative experience was realizing that I had written an ALGOL program in SNOBOL and that it
was a really stupid program. It was complicated. It was difficult to get to run. It ran slowly and it was not
how any sane SNOBOL programmer would write it. So I had to go back and learn the idioms. You can’t
just take a language and start writing in it as if it was your previous language, which is what we essentially
all do at first. Then we realize that we’re doing it again and correct. That I actually learned, I think, in the
first half year of programming.

Five Popular Myths About C++

Bjarne Stroustrup, the creator of the C++ language, has written a series of posts (part 1, part 2, part 3) on these five myths about C++:

  • “To understand C++, you must first learn C”
  • “C++ is an Object-Oriented Language”
  • “For reliable software, you need Garbage Collection”
  • “For efficiency, you must write low-level code”
  • “C++ is for large, complicated, programs only”

[HT: ISO C++ blog]

ODB C++ ORM 2.4.0 Adds Bulk Operations

ODB is an open source object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any of the mapping code.

Major new features in the 2.4.0 release:

  • Support for bulk operations in Oracle and SQL Server. Bulk operations can be used to persist, update, or erase a range of objects using a single database statement execution which often translates to a significantly better performance.
  • Ability to join and load one or more complete objects instead of, or in addition to, a subset of their data members with a single SELECT statement execution (object loading views).
  • Support for specifying object and table join types in views (LEFT, RIGHT, FULL, INNER, or CROSS).
  • Support for calling MySQL and SQL Server stored procedures.
  • Support for defining persistent objects as instantiations of C++ class templates.

More information can be found in the official announcement and the developer’s blog.