+ 1

What is this?

Template <typename x> struct traits

12th Sep 2020, 5:49 PM
Gaurav Rawat
Gaurav Rawat - avatar
1 Respuesta
+ 2
For generic use of classes or functions parameters.When a template is creating with undefined type for generic use later in function or class.This means the data type of argument/s will not be declared only on fonction specialization/call.data type will be int or float etc....Typename or class keywords are used to define generic data type not only one specified data type for a function.So you can later decide of what data type will be the function and its params.
12th Sep 2020, 9:21 PM
HBhZ_C
HBhZ_C - avatar