On Friday 15 January 2016 11:28:32 Иван Комиссаров wrote: > I've already heard those arguments, however we _can't_ use std::vector in > API, because it's implementation may differ between compliers (gcc and > clang stdlibs, for example). > But we can use some features that implemented in the same way (std::pair or > std::exception). > You can continue to say how bad QVector is (and it is) but it will not be > thrown away in near future. > Same is for std::optional. Are they compatible between clang and gcc? (and > between different versions of gcc (std::unordered_map was not))
The problem with std APIs is not only layout compatibility (which, indeed, is not a problem for std::pair), but, as Thiago has mentioned on this list before, that the names don't match. It's std::pair in one impl and std::__1::pair in the next... That's only a "problem" as long as you make it one, though. No other C++ library guarantees compat between apps compiled with one STL impl and a librar compiled with another. That also was never the guarantee that Qt gave until, by not having STL types in the API, it started to magically work when one impl moved to a different inline namespace. I find that an overly broad definition of binary compatibility and it does more harm than good. Thanks, Marc -- Marc Mutz <marc.m...@kdab.com> | Senior Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company Tel: +49-30-521325470 KDAB - The Qt Experts _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development