C++C++17C++20Learn C++SyntaxTemplates

How To Use void_t Alias Template in C++ 17?

In C++ 17, there is a very useful alias template for metaprogramming that can be used to simplify use of SFINAE. The void_tis a meta-function that is used to map any types ( or types) to typevoid. In this post, we explain what is void_t, how you can use it in different examples. What is alias template void_t in C++ 17? The void_t is an alias template which is introduced with…
Read more
C++C++14C++17C++20Learn C++SyntaxTemplates

How To Use Variable Templates In Modern C++

The template is one of the great features of modern C++. They are a simple and very powerful statement in C++ that defines the operations of a class or function. The C++14 standard and above allows the creation of variables that are templated. In this article, we will explain variable templates in C++ with examples that can be used in a professional IDE and compiler that supports C++14…
Read more
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++SyntaxTemplates

What Are The Type Template Parameters In C++

Template feature in C++ is one of the great features of modern C++. One of the great features of modern C++ is the ability to define templates. Templates are one of the most important techniques for you to learn, since it’s really only with knowledge of templates that you can claim to understand C++. So much of C++, including the standard library that you use every day as a C++…
Read more