C++C++14C++17C++20Learn C++

What Are The Member Initializers And Aggregates Features in C++14?

C++14 brought us a lot of useful things that we use today. One of the great features of C++14 was the member initializers and aggregates feature that a class with default member initializers may now be an aggregate. In this post, we explain how can use member initializers and aggregates with examples. What are the member initializers and aggregates features in C++14? With the new C++14, a…
Read more
C++C++14C++17C++20Learn C++

What Is Heterogeneous Lookup In Associative Containers In C++?

Containers are data storage arrays in modern C++ and they are very useful to iterate and search data with their amazing methods and properties. The C++ Standard Library defines four different main container types and one of them is associative containers such as std::map, and std::set. These class types allow us to use the look-up method “find()” by a value based on a value of that…
Read more
C++C++14C++17C++20Learn C++

What Are The Differences Between Mutex And Shared Mutex In C++?

The concurrency support library in modern C++ is designed to solve read and write data securely in thread operations that allow us to develop faster multi-thread apps. This library includes built-in support for threads (std::thread), atomic operations (std::atomic), mutual exclusion (std::mutex), condition variables (std::condition_variable), and many other features. In C++14, in addition to…
Read more
C++C++14C++17C++20Learn C++

What Is Decltype (auto) In Modern C++ And How To Use It?

The auto keyword arrives with the new features of the C++11 and the standards above. In C++14, there is a new decltype that is used with auto keyword. In modern C++, the decltype(auto) type-specifier deduces return types while keeping their references and cv-qualifiers, while auto does not. In this post, we explain what decltype (auto) is in modern C++ and how to use it. What is auto in…
Read more