Boost logo

Boost :

Subject: Re: [boost] enabling constexpr with Visual studio 2015 Update 3 (RC)
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-06-16 06:16:13


> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Marcel Raad
> Sent: 16 June 2016 07:50
> To: boost_at_[hidden]
> Subject: Re: [boost] enabling constexpr with Visual studio 2015 Update 3 (RC)
>
> pabristow wrote
> > But IMO *we really must know* which of std:c++14 and std::c++lastest (and
> > others including c++11, c++17) are being specified for
> > the compiler to use.
> >
> > The compiler version _MSC_FULL_VER = 190024123 does not tell you this -
> > only that it is VS 2015 update 3.
>
> Seems like _MSVC_LANG is 201403 and _HAS_CXX17 is 1 with /std:c++latest.
> _MSVC_LANG is 201402 and _HAS_CXX17 is 0 with /std:c++14. See yvals.h.

Confirmed thanks.

/std:c++latest
   Hello Boost!
   Platform: Win32
   Compiler: Microsoft Visual C++ version 14.0
   STL : Dinkumware standard library version 650
   Boost : 1.61.0
   _MSC_VER =1900
   _MSC_FULL_VER=190024123
   _MSVC_LANG=201403L
   __cplusplus=199711L
   _HAS_CXX17=1
   _HAS_AUTO_PTR_ETC=0
   Processor architecture = (x64)

   /std:c++14
   Hello Boost!
Platform: Win32
Compiler: Microsoft Visual C++ version 14.0
STL : Dinkumware standard library version 650
Boost : 1.61.0
  _MSC_VER =1900
  _MSC_FULL_VER=190024123
  _MSVC_LANG=201402L
  __cplusplus=199711L
  _HAS_CXX17=0
  _HAS_AUTO_PTR_ETC=1
Processor architecture = (x64)

but confusingly, _MSVC_LANG is not shown as defined using the IDE, but only gets defined and a value assigned when called by, for
example, PRINT_MACRO in

boost_1_61_0_b1\libs\config\test\config_info.cpp

These macro MSVC_LANG and _HAS_CXX17 could usefully be added to config_info.cpp?

This looks workable, if not uber convenient or clear. But things are getting better - slowly...

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