On Tuesday 16 June 2015 10:27:15 Matthew Woehlke wrote:
> Ignoring whether or not to use 'auto', there actually *is* a reason to
> use the static_cast... it communicates that, yes, you really want back
> an 'int', even if that means a conversion loss e.g. because your input
> is a 'double'. (See e.g. '-Wconversion'.)

For PODs, please use function-style casts.

        auto i = int(longValue);

Of course, you had to type an extra keystroke compared to

        int i = int(longValue);

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to