1

Topic: Types of parameters of templates

why with structure s0 there is no error, and with structure s1 is. #include <utility> template <int... ints> struct s0 {}; using pair = std:: pair <int, int>; template <pair... pairs>//' struct std:: pair <int, int> ' is not a valid type for a template non-type parameter struct s1 {}; int main () {using tso = s0 <1,2,4>; using ts1 = s1 <{1,1}, {2,2}>//template argument 1 is invalid} As I should declare and  structure s1? Why with structure s0 is not present  problems?

2

Re: Types of parameters of templates

Hello, Tasheehoo, you wrote: T> As I should declare and  structure s1? For what such application-oriented tasks it was required? T> Why with structure s0 is not present  problems? Because there are restrictions. Even with float will not work.