From: "lars.kn...@nokia.com<mailto:lars.kn...@nokia.com>" 
<lars.kn...@nokia.com<mailto:lars.kn...@nokia.com>>
Date: 2 February 2012 4:49:45 AM AEDT
To: "thiago.macie...@intel.com<mailto:thiago.macie...@intel.com>" 
<thiago.macie...@intel.com<mailto:thiago.macie...@intel.com>>, 
"development@qt-project.org<mailto:development@qt-project.org>" 
<development@qt-project.org<mailto:development@qt-project.org>>
Subject: Re: [Development] Dropping QT_NO_STL (was: The future of QtAlgorithms)


Guess I should give my $0.02 as well ;-)

I'm perfectly fine with dropping -no-stl. As already explained in this
thread, we need STL (or a subset of it) anyways on embedded systems (due
to V8 and WebKit). On desktop systems -no-stl doesn't make any sense
anyway.

Now the main point is about decent guidelines on where and how we use the
STL. Thiago had a pretty good first list and with a little tuning we might
get to a good policy here.

I think we need to be careful and try to avoid adding STL dependencies to
our public headers. Ideally, we get away with forward declarations of STL
types for interoperability.

In implementations, we can use whatever makes most sense from the set
agreed upon (with some care, so we keep our code readable and
maintainable). So if std::vector is better suited to a certain task than
QVector, let's just use it.

Cheers,
Lars


Sorry for commenting so late in the game on this thread, just catching up on 
email after being on leave. ;)

Before any STL types (particularly containers) are included in a public API, I 
would strongly recommend testing that these types can actually be exported as 
part of the interface on all platforms and supported compilers. I've got a 
sneaking suspicion that we've seen issues before (I think on Windows) where 
some specific STL containers were not exportable. Don't know if it is still a 
potential issue with the current set of compilers, but thought I'd mention it 
in case others have more concrete experience than me on this one. Also note 
that STL exception classes cannot be exported and caught reliably on all 
platforms (but I don't think anyone is talking here about adding STL exceptions 
to anything in the Qt API).

--
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
Melbourne, Australia



_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to