lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Designated initializers


From: Vadim Zeitlin
Subject: Re: [lmi] Designated initializers
Date: Fri, 16 Apr 2021 23:23:42 +0200

On Fri, 16 Apr 2021 20:09:32 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> Vadim--Do you see any reason why lmi should not use designated initializers
GC>   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0329r0.pdf
GC> before officially upgrading to C++20? I'm working on some code that would
GC> benefit from this new feature, and it appears that they're already supported
GC> by compiler versions we care about:
GC> 
GC>   https://mariusbancila.ro/blog/2020/02/27/c20-designated-initializers/
GC> | Designated initializers are supported in VC++ 2019 169.1, GCC 8 and Clang 
10.
GC> 
GC> so I'd suppose this is okay, but I wanted to ask you first.

 Thanks for asking!

 I can indeed confirm that even not the latest 16.8.2 versions of MSVS 2019
("169.1" above must be a typo and "16.9.1" was probably meant instead)
supports designated initializers, at least in the simple use cases, so it
should be fine to use them. And I'll try to test them in the real code,
with MSVS, when you push the changes using them.

 And no, I don't see any other reason to avoid them. Admittedly, I don't
have much experience with them, as I've only encountered them in Linux and
gcc-only projects so far, but they do look useful.

 Regards,
VZ

Attachment: pgplVPJufbsA3.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]