Generics in C++ 5 - Variadic arguments and Variadic Function Templates | Modern Cpp Series Ep. 75

Published: 25 July 2022
on channel: Mike Shah
12,359
414

►Full C++ Series Playlist:    • The C++ Programming Language  
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel:    / @mikeshah  

►Lesson Description: In this lesson we are going to look at creating a function template with a variable number of arguments. We are going to create a function template using a parameter pack to have an arbitrary number of arguments. This has an advantage of being type safe and also avoids any run-time checks versus using va_args in the stdarg.h header. I'll show in this lesson an example of how to properly create and use a Sum function with variable arguments, and one thing to watch out for.

►YouTube Channel:    / mikeshah  
►Please like and subscribe to help the channel!


Watch video Generics in C++ 5 - Variadic arguments and Variadic Function Templates | Modern Cpp Series Ep. 75 online, duration hours minute second in high quality that is uploaded to the channel Mike Shah 25 July 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 12,359 times and liked it 414 visitors.