On Tuesday, 7 May 2019 05:13:33 PDT Ola Røer Thorsen wrote:
> lør. 4. mai 2019 kl. 17:51 skrev Thiago Macieira <thiago.macie...@intel.com
> 
> > No, the size of something definitely fits in int on 32-bit systems. And
> > why do
> > you need to do any static_cast in the first place?
> 
> We build our code using gcc with the options "-Wall -Wextra -Werror" and
> this leads us to have to use static_cast for example when comparing int and
> unsigned int (or std::size_t). A mix of using std::array, std::string and
> QVector/QByteArray often gives a few extra static casts, not that it
> bothers me too much.

Well, that's your problem: mixing the APIs. The committee has recognised that 
it should have used signed types, but it can't change now.

If there's ever an STL2 (std2 namespace), it'll use signed.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to