C++20 Lambda Expressions, Non-type Template Parameters, Constraints and Concepts -- Gajendra Gulguli

How to write a class and fuction template declaration which uses functions and lambda expressions as non-type template parameter.

C++20 Lambda Expressions, Non-type Template Parameters, Constraints and Concepts

by Gajendra Gulgulia

From the article:

In this article I will explain how to write a class and fuction template declaration which uses functions and lambda expressions as non-type template parameter.

Function as Non-Type-Template-Parameter ( NTTP henceforth) looks like below in class and function template as of C++17.

template<auto FunctionType> class Foo{
// ...
};

template<atuo FunctionType>
void foo();

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.