[gmx-developers] MSVC conversion from 'double' to 'real' requires a narrowing conversion
Eric Irrgang
ericirrgang at gmail.com
Wed Jul 5 20:47:24 CEST 2017
I'm unclear on the issue. Is the problem with an implicit conversion in
your code or is there a bug that MSVC ignores the aspect of the standard
that should make constant expressions okay in initializer lists? If the
latter, explicit casting seems like the right solution.
A user-defined literal could be very confusing and hard to document
effectively.
On Tue, Jul 4, 2017 at 8:15 PM, Schulz, Roland <roland.schulz at intel.com>
wrote:
> You could define a user defined literal _r for real. I think this would be
> anyhow useful to have.
>
> -----Original Message-----
> From: gromacs.org_gmx-developers-bounces at maillist.sys.kth.se [mailto:
> gromacs.org_gmx-developers-bounces at maillist.sys.kth.se] On Behalf Of
> Vedran Miletic
> Sent: Monday, July 3, 2017 6:58 AM
> To: GROMACS developers <gmx-developers at gromacs.org>
> Subject: [gmx-developers] MSVC conversion from 'double' to 'real' requires
> a narrowing conversion
>
> Hi,
>
> I'm hitting MSVC's conversion from 'double' to 'real' requires a narrowing
> conversion error on Jenkins. Is there a workaround that still allows using
> array initializers?
>
> I checked Stack Overflow but neither of those solutions is particularly
> nice:
> *
> https://stackoverflow.com/questions/42491243/conversion-
> from-double-to-int-requires-a-narrowing-conversion
> *
> https://stackoverflow.com/questions/33605632/error-83-
> error-c2398-conversion-from-double-to-float-requires-a-narrowing-c
>
> Regards,
> Vedran
>
> --
> Vedran Miletić
> vedran.miletic.net
> --
> Gromacs Developers mailing list
>
> * Please search the archive at http://www.gromacs.org/
> Support/Mailing_Lists/GMX-developers_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
> --
> Gromacs Developers mailing list
>
> * Please search the archive at http://www.gromacs.org/
> Support/Mailing_Lists/GMX-developers_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20170705/19c166e4/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list