[Interest] Creating a QVariant of QList<QObject*> knowing only the class name
Robert Buchinger
robert_buchinger at gmx.at
Thu Feb 23 09:06:34 CET 2017
On Donnerstag, 23. Februar 2017 09:03:03 CET Thiago Macieira wrote:
> On quarta-feira, 22 de fevereiro de 2017 23:58:29 PST Thiago Macieira wrote:
> > int x = abs(getValue1()),
> >
> > y = abs(getValue2());
> >
> > if (x * y < x)
> >
> > throw overflowError();
> >
> > According to the standard, the exception above can never be thrown.
>
> No, sorry, the code above has one valid code path that leads to the
> exception: if y is 0.
>
> But it does not check for overflow.
And x != 0 ;)
r
More information about the Interest
mailing list