0

Good day. I am continuing to read the book " C++17 in detail " of Bartlomiej Filipek.

Page 63 ( 85 of pdf ebook), he wrote the following code at the bottom of my message.

I kindly ask your help to understand how it works : I have compiled this piece of code , lonely, and it compiled. So, I try to understand why.

I explain the deep motivation of my question : Usually, I see struct templates, class templates, function templates. But here , I don't see any of those cases. It seems to be a variable "template", which I am not used to encounter.

I have seen two links that did not reply to my question :

Non-type template parameters

template non-type template parameter?.

Thank you in advance for your kind explanations about that.

template<typename Type, Type value>
constexpr Type TConstant=value;
Dev
  • 463
  • 3
  • 12

0 Answers0