[cmake-developers] C++11 all features available?

Daniel Pfeifer daniel at pfeifer-mail.de
Tue Aug 22 17:57:45 EDT 2017


On Mon, Aug 21, 2017 at 4:32 PM, Sebastian Holtermann <seblist at xwmw.org>
wrote:

> Am Montag, 21. August 2017, 10:04:28 CEST schrieben Sie:
> > On 08/21/2017 09:53 AM, Sebastian Holtermann wrote:
> > > it looks like C++11 is now a requirement for CMake itself.
> >
> > Yes.  We just merged this:
> >
> >   https://gitlab.kitware.com/cmake/cmake/merge_requests/1132
> >
> > but you beat us to the announcement.
>
> I saw the MR last week and was delighted. The iterator type naming in `for`
> loops drove me mad.


Feel free to use `auto`, but you will need to hold off range based for
loops.


> > > But does this mean *all* the nice features from the std library can be
> > > used?
> > Not all.  We're still limited by some of the older C++11 compilers.
> > We'll have to see how things go on nightly builds.  As limitations
> > are found they can be documented in `Help/dev/source.rst`.
>

Please have a look at the nightly testers on
https://open.cdash.org/index.php?project=CMake and compare the feature
availability here: Please see
http://en.cppreference.com/w/cpp/compiler_support

Currently CMake is still built with Visual Studio 2010, ie. MSVC 16.0.

That means we should be able to use auto, nullptr, lambdas, std::array,
std::function, type traits, trailing return types, r-values, ...

Cheers, Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170822/daa91a04/attachment.html>


More information about the cmake-developers mailing list