I read the following different sources,
- All the static data members are initialized before main() (even though the main() and static data members exist in different translation unit). – Agree
- The inline functions are duplicated in each source file or translation unit in which they are invoked. - Agree
It is clearly stated that static data members are initialized before main() then,
- What is the problem, if the inline functions access the static members?
- Why it is not safe to use static data members with in inline function?
Please explain with some clear examples.
main, or after the end, but that has nothing to do with inline functions.)