Saturday, October 30, 2010

C++ note: static variable from inline member function

I was thinking about Meyers singleton, and wonder how compilers will handle the same static variable defined in difference modules due to inline function expansion. Here are some relevant discussions (it occurs safe not to use the kind of singleton(?)).

http://objectmix.com/c/250462-static-local-variable-inline-static-member-function.html

No comments: