|
Boost : |
Subject: [boost] enabling constexpr with Visual studio 2015 Update 3 (RC)
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-06-11 11:41:44
I am trying to use the enhanced constexpr features and have (perhaps unwisely) downloaded the latest Visual Studio Update 3 (RC) to
get as great a chance of achieving this as possible.
https://blogs.msdn.microsoft.com/vcblog/2015/12/02/constexpr-in-vs2015-update-1/ (and later posts)
I am unsure what I need to do to ensure that the compiler is enabled for use the latest features.
I have added /std:c++14 to the options of the property for the project.
(aside I also tried /std:C++latest but that works for some tasks but failed to compile with odd-looking errors in converter.hpp
Error C2518 keyword 'typename' illegal in base class list; ignored
\modular-boost\boost\numeric\conversion\detail\converter.hpp 453
// Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S
//
template<class Traits>
struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type
,BOOST_DEDUCED_TYPENAME Traits::result_type
>
,public dummy_range_checker<Traits>
{...}
So I stopped trying that /std:c++latest option. What else should it do?)
Running the modular-boost/libs/config/config_info.cpp program
BOOST_NO_CXX14_CONSTEXPR [no value]
BOOST_CONSTEXPR [no value]
BOOST_CONSTEXPR_OR_CONST =const
BOOST_STATIC_CONSTEXPR =static const
These don't seem to be what I think that I would expect (constexpr and static constexpr).
I want especially to use BOOST_STATIC_CONSTEXPR to get static constexpr.
Do I need to also add #define BOOST_CXX14_CONSTEXPR in my program or elsewhere?
(Doing this doesn't change BOOST_CONSTEXPR_OR_CONST from const to constexpr)
Thanks for any suggestions.
Paul
--- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk