We can have the following and it is valid:
template<std::size_t Size = 10>
fn(){...}
template<typename Size = std::size_t>
fn() {...}
But how to do this?
template<typename Size = std::size_t=10>
fn() {...}
A template parameter is either a type or a value, it isn't both.
You can do it with two parameters
template<typename Size = std::size_t, Size s = 10>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With