How singleton in boost implement all singletons are initialized before main is called?
问题 The source code of singleton of boost is there ,I don't understand two notations in the source file below: // ***include this to provoke instantiation at pre-execution time*** static void use(T const &) {}; BOOST_DLLEXPORT static T & get_instance() { static detail::singleton_wrapper< T > t; ***// refer to instance, causing it to be instantiated (and // initialized at startup on working compilers)*** BOOST_ASSERT(! detail::singleton_wrapper< T >::m_is_destroyed); use(instance); return static