On Monday 15 June 2015 08:24:22 Simon Hausmann wrote: > > QtPatternist > > An internal namespace, not reflected in the public API.
QtPatternist::Item appears in public functions of exported public API class QXmlNodeModelIndex, e.g. Yes, now I see the comment (git grep hid it). > > QtConcurrent > > A namespace for functions only, no public classes within. > > > QTest > > A namespace for functions only, no public classes within. _That_ argument again... :) Could you explain to me why you think that classes are different from functions, pleaae? >From a technical POV, the classes themselves have internal linkage. It's their member functions who have external linkage and are exported. And run(QThreadPool*, ...) forms as much part of QThreadPool's API as does QThreadPool::run(QRunnable*). All non-member functions that mention a type in their paramater list are logically part of the type. And C++ enforces that (with ADL). There's simply no difference between a class in a namespace and a free function in a namespace, except, of course, that after a using directive, you still see the class name (abridged) while you don't see the namespace for free functions. So _if_ there's a qualitative difference between free functions and classes in namespaces, it's the free function case that should be controversial, no? Thanks, Marc -- Marc Mutz <[email protected]> | Senior Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company Tel: +49-30-521325470 KDAB - The Qt Experts _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
