C++17: std::shared_mutex, interface_sizes, void_t, std::bool_constant, logical operation metafunctions

Class shared_mutex

On some platforms shared_mutex is more effecient then shared_timed_mutex.

In C++17 was added shared_mutex.

Example of usage:

Continue reading “C++17: std::shared_mutex, interface_sizes, void_t, std::bool_constant, logical operation metafunctions”

C++17: Modifications to existing features (Part 2)

Construction for values of fixed enums

Before C++17, variable of fixed enumeration was initialized like this:

if we will try to initialize like this:

we will have error: cannot convert ‘int’ to ‘E’ in initialization.

In C++17 it’s allowed to build.

Continue reading “C++17: Modifications to existing features (Part 2)”

C++17: Modifications to existing features (Part 1)

Single-argument static_assert

In C++17 static_assert message was changed to optional, and it’s possible create static_assert without message.

For example:

Continue reading “C++17: Modifications to existing features (Part 1)”