c++-gtk-utils
|
Prior to version 1.2.0, the library only used namespaces for modularity (providing namespaces for the Callback, MemFun, Thread and Utf8 modules). With version 1.2.0, the whole library (including those modular namespaces) is placed in the Cgu namespace. However, if the --with-cgu-using-directive configuration option is passed to ./configure, each of the library headers has a 'using namespace Cgu' using directive included within it in order to maintain source compatibility for code written against previous versions of the library.
There will still be one use case where source compatibility will not be maintained with earlier versions of this library using the --with-cgu-using-directive option. If a forward declaration of, say, the Thread::Mutex type has been made by, for example, code such as the following:
a 'using namespace Cgu' directive will not help, and this will no longer compile. Either the <c++-gtk-utils/mutex.h> header should be included instead, or the Cgu namespace specifically provided in the forward declaration.
Because this library uses modular namespaces where relevant, it will usually be perfectly safe to include a 'using namespace Cgu' directive, either via the configuration option mentioned above, or in the user program.