[英]using static data members in inline functions
I read the following different sources, 我阅读了以下不同来源,
It is clearly stated that static data members are initialized before main() then, 明确指出静态数据成员是在main()之前初始化的,
Please explain with some clear examples. 请用一些清晰的例子来解释。
There is no problem using static members and inline methods. 使用静态成员和内联方法没有问题。
You can find some similar discussion about static + inline here: static variables in an inlined function 您可以在此处找到有关static + inline的一些类似讨论: 内联函数中的静态变量
Even if it talks about static variables, the mechanism is similar. 即使谈论静态变量,其机制也是相似的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.