On 2/14/21 3:48 PM, Jean-Marc Lasgouttes wrote:
Le 14/02/2021 à 20:40, Richard Kimberly Heck a écrit :
Yes, it’s a matter of style and I’m ok with this too.
Latest changes made me think it’s more modern to use the {} syntax.
The {} notation uses the default initializer, whatever that is. So,
yes, nullptr would be more explicit but has the same effect.
See
https://arne-mertz.de/2015/07/new-c-features-uniform-initialization-and-initializer_list/
So Riki, what do you prefer in this case?
I'm no expert. I doubt it really matters very much, though maybe we
should settle on something, just for consistency. But it looks like
"uniform initializaton" is a thing, so maybe we should just get into the
habit of using {}. But I'd be happy to say as well: With plain types, we
use explicit initialization, e.g., 0 for ints; nullptr, for pointers;
etc. But we can use {} for the default with other types.
There are some other pretty cool C++11 features in this one
https://arne-mertz.de/2015/08/new-c-features-inherited-and-delegating-constructors/
that we might want to use, too.
Riki
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel