Possible usage of void in templates?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Possible usage of void in templates??

template <class T> T someFunction(T arg) { ... .. ... } Is it possible to write the same code like template <class T> void someFunction(T arg) { ... .. ... } Void instead of T????

3rd May 2019, 3:14 PM
Aamir Mehmood
1 Answer
+ 2
Aamir Mehmood yes it is possible to use void functions in templates
3rd May 2019, 3:32 PM
Pikachu
Pikachu - avatar