Back to Browse

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

19.9K views
Jul 26, 2022
15:01

►Full C++ Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join ►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: https://www.youtube.com/c/MikeShah ►Please like and subscribe to help the channel!

Download

1 formats

Video Formats

360pmp422.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

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