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

Craig Scott craig.scott at crascit.com
Wed Aug 23 05:15:44 EDT 2017


Probably just asking what a number of people are now thinking, but if we're
now requiring C++11 to build CMake, how long until we up the minimum Visual
Studio version from 2010 to at least 2013? Seems a bit optimistic to still
be trying to support 2010 as the minimum standard and also state C++11 as a
minimum.

On Wed, Aug 23, 2017 at 4:41 PM, Sebastian Holtermann <seblist at xwmw.org>
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.
>
> Okay, that's nice.
> Just to say, even without auto
>
>   for (const std::string& item : lst) {
>     ...
>   }
>
> is easier to comprehend than
>
>   for (std::vector<std::string>::const_iterator it = lst.begin();
>        it != lst.end(); ++it) {
>     const std::string& item = *it;
>     ...
>   }
>
> which is as C++(98) as can be.
>
> > > > > 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, ...
>
> Very nice. C++11 was such a great improvement to the language.
> It's much more fun to work with. Even with the slightly limited
> feature set available in CMake.
>
> -Sebastian
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
>



-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170823/c8aae369/attachment.html>


More information about the cmake-developers mailing list