...

/

Type-Traits Overview

Type-Traits Overview

In this lesson, we'll study the type traits library and its goals along with type-checks. This section could only provide an overview of the many functions of the type-traits library.

Type-Traits Library #

Type-traits enable type checks, type comparisons, and type modifications at compile-time.

Below are some applications of template metaprogramming:

  • Programming at compile-time
  • Programming with types and values
  • Compiler translates the templates and transforms it in C++ source code

We need to add a type_traits library in the header to enable all the functions present in the library.

#include <type_traits>

Type-Traits: Goals #

...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy