C++C++17C++20Learn C++Syntax

What Is aligned_alloc In Modern C++?

The C++11 standard introduced a new alignment feature as one of the many features of the C++ programming language that can be used with the newest C++ compilers today. This new feature was a new keyword align std::aligned_alloc that is used to provide a nested type that can be used as an uninitialized storage for any object whose size is at most the given object size by the alignment size…
Read more
C++C++11C++14C++17C++20Learn C++Syntax

What is aligned_union in Modern C++

The C++11 standard introduced alignment support as one of the many features of the C++ programming language that can be used with the latest C++ compilers today. One of the new features of this support was a new keyword align std::aligned_union that is used to provide a nested type which can be used as an uninitialized storage for any object whose size is at most the object size stated by…
Read more
C++C++11C++14C++17Introduction to C++Language FeatureLearn C++

What Are Generalized Constant Expressions (constexpr) In C++?

C++ is really awesome programming language that has many options to use variables in a way which can make your C++ App use less memory and app size. In this post, we explain what are a constant, a constant expression and generalized constant expressions in modern C++. What is the const constant keyword in modern C++? Let’s remember that, in C++ there are two ways to define constants.
Read more
C++C++11C++14C++17Introduction to C++Learn C++Syntax

What Is Static Assertion And How To Use static_assert In C++?

In C++, as with any programming language, it’s important to ensure that the logic of your program is correct even when the compiler thinks the syntax is valid. This is true no matter how good your C++ dev tool may be. Logical errors – where something in the program code should be true or false, can be very difficult to spot and track down because the code looks correct but the flaw in…
Read more