Il 16/04/2017 18:32, Corentin ha scritto: > > More on point: > * You don't actually need to include anything from the STL to > implement std::hash.
You actually do: you need <functional> to see the primary template for std::hash (otherwise you can't specialize it). Also, how to implement it is another burden (see the other discussion). > * For qHash, maybe one or more qt_stl.h headers that would include > the required stl headers. Forward declare when possible ( probably not > often, sadly ). Compilations times may, for the time being, be an issue > but I don't think Qt can or should work around them. > > I would also prefer a solution that is independent of the order of the > includes. A central STL header would work for qHash (apart from the huge compilation times, as it'll need to include a *lot* of stuff), but I'm scared that it would quickly become a maintenance nightmare. It would be a bit dangerous for Q_DECLARE_TYPEINFO: such a declaration might change the ABI for a type (so, for instance, if you include qt_stl.h in a TU and forget in another TU and only include the STL header, now the two TUs are binary incompatible between each other...). Cheers, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
