December 2017

A friendly type predicate--Andrzej KrzemieĊ„ski

To improve the error messages.

A friendly type predicate

by Andrzej Krzemieński

From the article:

This is a sequel to the previous post on writing a custom type predicate. One of the readers on Reddit made a very insightful observation. The user has implemented a type that she intends to use with our library, call it Calc. She passes it to the library function, and she gets the compiler error:

static assertion failed: X does not have a desired interface

But what is our type missing? In the previous post we were describing 3 constraints. A concept could have far more of them. The user has already made an effort to have Calc comply with the constraints, so there must be something tiny missing. Maybe there is a bug in the implementation of the predicate? But it is difficult to track what it is that the predicate does not like about our type. We could use some more specific information...

Speeding up the Build of C and C++ Projects

Many programmers know firsthand that C and C++ program builds very long. Someone solves this problem by sword-fighting at build time, someone is going to the kitchen to "grab some coffee". This article is for those who are tired of this, and who decided it is time to do something about it.

Speeding up the Build of C and C++ Projects

by Phillip Khandeliants

From the article:

If your operating system uses ELF format object files (Unix-like systems), you can replace the GNU ld linker with GNU gold. GNU gold comes with binutils starting from the version 2.19, and is activated by the flag -fuse-ld=gold. In CMake it can be activated, for example, by the following code.

 

CppCast Episode 131: C++ Object Model with Nicole Mazzuca

Episode 131 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Nicole Mazzuca to talk about the C++ Object Model, and some of the differences between Rust and C++.

CppCast Episode 131: C++ Object Model with Nicole Mazzuca

by Rob Irving and Jason Turner

About the interviewee:

Nicole is someone who's thought a bit too much about object models and error handling. She started in C, moved to Rust, and then fell into C++ a year ago. She also loves coffee, and latte art.

Boost 1.66 is out!

New version of boost!

Boost 1.66 is out!

From the article:

New Libraries

  • Beast: Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio, from Vinnie Falco.
  • CallableTraits: A spiritual successor to Boost.FunctionTypes, Boost.CallableTraits is a header-only C++11 library for the compile-time inspection and manipulation of all 'callable' types. Additional support for C++17 features, from Barrett Adair.
  • Mp11: A C++11 metaprogramming library, from Peter Dimov.

...

Clang 5 in a Docker container for C++17 development--SolarianProgrammer

Very convenient to create a development environment without hassles.

Clang 5 in a Docker container for C++17 development

by SolarianProgrammer

From the article:

If you want to try the new C++17, using Clang in a Docker container, you are in the right place. Running Clang in a container has the advantage that it is light on resources and won’t mess with your underlying OS. The last point is especially important if your host operating system is macOS, on which it is a really bad idea to directly install a binary Clang other than the one that comes with Xcode. I’ve tested the approach presented in this article on Windows 10, macOS High Sierra and Ubuntu Linux.