Qt-interest Archive, February 2007
about "-no-stl" parameter
Message 1 in thread
Hi!
Does anybody knows about parameter "-no-stl" while configuring Qt for
building? Is it means that Qt will not use STL? And what will use Qt?
Internal self-made templates? Or what?
--
[ signature omitted ]
Message 2 in thread
Anatoly Kanashin schrieb:
> Hi!
>
> Does anybody knows about parameter "-no-stl" while configuring Qt for
> building? Is it means that Qt will not use STL? And what will use Qt?
> Internal self-made templates? Or what?
Qt does not use STL internally - that's why they have implemented their
own "STL-like" classes such as QString, QList, QMap etc. as to be
platform independent (and yes, in the earlier days of C++ some STL
implementations really sucked ;)
But each "Qt STL-like" class such as QList has conversion methods as to
convert back and forth from the corresponding STL, for example:
QList<T> QList::fromStdList ( const std::list<T> & list )
It's exactly those "conversion" methods which are affected with the
-no-stl switch: when you define it then those conversion methods won't
be available, assuming that your application does not use STL (or at
least you don't need to convert STL to Qt classes or vice versa).
I guess this increases portability of Qt itself (in case it has to be
compiled on some exotic platform where the STL implementation sucks) and
saves a few bytes in DLL size ;)
Cheers, Oliver
--
[ signature omitted ]