On terça-feira, 3 de setembro de 2013 19:17:53, Olivier Goffart wrote: > But because we don't want to use the STL in our ABI, we can't use > std::unique_ptr as parameter or return value of our exported functions. > > So we have to duplicate, or we have to reconsider that decision not to use > the STL.
There are two issues here: 1) we cannot use any of the C++11 additions to the Standard Library, anywhere That includes inside .cpp, even if it does not affect the ABI. That's because we have no way of properly detecting whether the feature has been added to the library in use. At least in Blackberry, the C++ library is a much older version than the compiler in use. The exceptions are std::move, std::forward, and std::initializer_list, mostly because they're already in use and because they exist only to complement a language feature (respectively, rvalue references; rvalue references and variadic templates; uniform initialisation). And even if you can detect the presence of the feature, you need to make sure that Qt still compiles when the feature is absent. That either means having a fallback codepath or disabling the Qt feature if the Standard Library feature is absent. 2) we cannot use any Standard Library symbol somewhere that affects the ABI (besides the language support features, like operator new, typeinfos, etc) That's because we need to support multiple C++ standard libraries that are binary incompatible with one binary: libc++ and libstdc++. While libstdc++ is waning on OS X, libc++ gets more interesting on Linux and especially the BSDs. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
