C++C++11C++14C++17Learn C++Templates

Learn How To Use Non-Copyable Movable Types in C++ Templates

In C++, memory and CPU/GPU management are very important and the compiler is amazingly using them well in templates, classes, and objects. Every declaration and usage of any bits may cause a lot of heavy calculations, memory usage, and high CPU/GPU usage. Using copy and move types in templates is very important when you develop a professional app. In this post, we explain how you can use…
Read more
C++C++11C++14C++17C++20Learn C++

What Is The Explicit Specifier In Modern C++?

In modern C++, explicit-qualified conversion functions work in the same context as explicit-qualified constructors and produce diagnostics in the same contexts as constructors do. C++11, C++17, and C++20 standards have improvements in this explicit specifier. This is done in order to avoid situations when the compiler uncomplainingly accepts code that is not semantically correct. In this post, we…
Read more
C++C++11C++14C++17C++20Introduction to C++IteratorsLearn C++Syntax

What is a range-based for loop in modern C++?

In C++, the for loops are one of the great features of C and C++ language that has many options to break, continue, or iterate in a loop. In modern C++, there is a range-based for loop that makes it simple to iterate through a variable type that has members (i.e. strings, lists, arrays, vectors, maps, etc.). The range-based for loop is a feature for the for() loops introduced by the C++11…
Read more
C++C++11C++14C++17C++20Introduction to C++Learn C++Syntax

Learn How To Use The Final Specifier In Modern C++

Modern C++ has many additions compared to the original C++ standard. Regarding virtual overrides, C++11 tends to tighten the rules, to detect some problems that often arise. To achieve this goal C++11 introduces two new contextual keywords, the final and the override. The final specifier (keyword) is used for a function or for a class that cannot be derived and overridden by derived classes. This…
Read more