[CLN-list] CLN switched to C++11
Bruno Haible
bruno at clisp.org
Sun Oct 27 22:16:20 CET 2019
Richard B. Kreckel wrote:
> > MSVC seems to accept C++11 by default. For some reason, in spite of that
> > the configure test fails on MSVC.
>
> Maybe you could check and see why ax_cxx_compile_stdcxx.m4 fails?
It's quite obvious: The test checks for 12 language features of C++11.
As standards evolve in big steps, and compiler support evolves in small
steps, it is normal that a compiler supports only a portion of the
language feature of every standard.
CLN needs 1 out of these 12 features, namely static_assert.
It's pointless to throw our arms in the air and say "we can't support MSVC 14
because it does not support all of the C++11 features", when in fact we need
only 1 out of 12 features.
> All in all, after having ported lots of code to C++11, I must say that
> things simply become much more consistent. C++11 gives us lambda
> expressions, rvalue references, more consistent constructors, uniform
> initialization, etc. etc.
All these C++11 features mean an increased learning curve for the developer.
As long as a feature does not provide clear benefit, my vote is to NOT use
it. Rvalue references, for example: I read the description, maybe even
twice, and the impression I got is that it complicates things; it does not
simplify things.
Bruno
More information about the CLN-list
mailing list