
10 Dec
2005
10 Dec
'05
10:33 a.m.
Frank Laub wrote:
class Boolean_base { protected: typedef boost::array<const char*, (size)+1> array_type; static const array_type& storage() { static const array_type names = { "False", "True", "2" }; return names; } };
One more thing: using static data inside a function usually introduces thread-safety issues. I'm not sure if boost::array suffers from this, but I think it worth a check. If there is a problem, you might want to switch to native C++ arrays, or get some help from Jason's singleton...