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

What Is Auto Return Type Deduction In C++?

C++11 allowed lambda functions to deduce the return type based on the type of the expression given to the return statement. The C++14 standard provides return type deduction in all functions, templates, and lambdas. C++14 allows return type deduction for functions that are not of the form return expressions. In this post, we explain the auto keyword, what is an auto type deduction, and how we…
Read more
C++C++14C++17C++20Learn C++

What Does Deprecated Mean And How To Use Deprecated Attribute In C++?

C++ is very strong in every aspect of modern programming and evolves and refines itself even further with the release of each new C++ standard. While there are many new additions there are some features that are found not useful or dangerous in programming, thus the community offers its deprecation in the next standard and then it is generally removed in the following standard. C++14 came with a…
Read more
C++C++14C++17C++20Learn C++

Learn To Use Digit Separators In Modern C++

In the history of modern C++, the C++14 standard brings us some very useful features. C++14 comes with the digit seperators feature. In C++14 and above, we can use the digit separator  to separate integer numbers. In this post, we explain, how to use digit separators in examples, How can I use use digit separators in modern C++? In C++14, there is a new Digit Separators feature. The digit…
Read more
C++C++11C++14C++17C++20Learn C++

How to Use Atomic_flag In Modern C++?

C++11 allows the use of atomics in signal handlers. In C++17 the signal handler feature is further improved. The std::atomic_flag is an atomic boolean type that is guaranteed to be lock-free and can be used in signal handlers. Moreover, the <csignal> header in C++ has an integer type std::sig_atomic_t that can be accessed as an atomic entity even in the presence of asynchronous…
Read more