3 ms·
auto in this context creates a non-type template parameter (NTTP). They've been in the language since C++11 (std::array<int, 3>).
by hn_go_brrrrr 3y ago
auto in this context creates a non-type template parameter (NTTP). They've been in the language since C++11 (std::array<int, 3>).
- ynik 3y agoNon-type template parameters (NTTP) were already in the original standard, they've existed since C++ had templates. Being able to use "auto" for the type of the NTTP was new in C++17; and using class types like std::array for NTTPs was only added in C++20.