page-fault

Removed or Fixed Language Features

Removed Elements

The following items have all been removed. We’d get build errors if we were using any of these under C++17, so we can be fairly certain that we’re not accidentally using them.

Fixes

Direct List Initialisation with auto

C++17 updates the type deduction rules for direct list initialisation.

auto item { 1.0f };     // direct initialisation, deduces type `float` since C++17
auto list = { 1.0f };   // copy initialisation, deduces type `std::initializer_list<float>`
auto x {1, 2}; // this will cause a compile error as of C++17

static_assert with No Message

Frequently, we don’t need to describe static assertions as their conditions are descriptive enough.

Different begin and end Types in Range-Based For Loop

Allows an end iterator to have a different type to the begin iterator, which is useful for implementing sentinels. Makes possible the implementation of C++20 ranges.