
1 Sep
2011
1 Sep
'11
6:25 a.m.
It can't, you will end up with a different function static variable for each translation unit.
This isn't the case. If you have an inline function with a static variable in it, it'll be the same variable in all translation units.
*7.1.2p4 A static local variable in an extern inline function always refers to the same object.*
... which I guess means you can still end up with several definitions when using dynamic libraries ? Thanks, Julien