Month: March 2022

C++ Template argument deduction vs specialization

If you don't know the type at compile time you can just use the template parameter type and the compiler will deduce the type from the function call itself. For example, see the commented out c'tor below. This is great for typing the size of std::array function parameter. However you could come unstuck if a…

Read the full article