Рет қаралды 4,975
Everything that you wanted to know about static (when it is used outside of classes) but were afraid to ask. The video on using static in classes can be found here: • Use static in classes ...
UPD: Had to re-record and re-upload due to some issues with the previous attempt at this video.
📚 As always, the script to the video lives here: github.com/cpp-for-yourself/s...
00:00 - Start
00:27 - Don't use static outside of classes!
01:00 - What static actually controls
01:25 - Storage duration
04:32 - A glimpse into singleton pattern
05:23 - Summary of using static for storage duration control
05:56 - Linkage
08:22 - How to figure out linkage
09:24 - Don't use static to control linkage
14:01 - Summary
14:19 - Guideline on inline and static use
15:30 - Outro