TL;DR
Is it possible to compile Boost.Regex 1.76 in Header Only Mode (non BOOST_REGEX_CXX03
mode) with a C++/CLI i.e. /clr
i.e. _MANAGED
project?
We have been using Boost.Regex for years in our regular Visual C++ projects. A very few of our projects are compiled with Common Language Runtime Support (/clr)
which enables C++/CLI, (and for these we always linked in the boost regex library statically). We always pre-built the boost regex DLL and static lib and then linked these from MSVC.
Now, with Boost 1.76 Boost.Regex newly is header only, unless compiling in C++03 mode.
( Version 1.76.0 ) ...
Regex:
- Regex is now header only except in C++03 mode
- Support for C++03 is now deprecated.
- ...
However, our C++/CLI project will -- through the boost config magic -- automatically select to build Boost.Regex in the C++03 == BOOST_REGEX_CXX03
mode!
- Our current MSVC is Visual Studio 19.7.6,
_MSC_FULL_VER 192729112
Since no longer having to pre-build any Boost.Regex binaries would be quite handy, we're currently looking into whether we can get the C++/CLI project to compile in the non BOOST_REGEX_CXX03
mode:
- Does anybody know how through the magic of boost/config the macro
BOOST_REGEX_CXX03
is selected for a C++_MANAGED
project? (I currently suspect_CPPLIB_VER
, but I'm not even sure what version that is.) - Can we switch this? ->
Is it possible to compile Boost.Regex 1.76 in Header Only Mode with a C++/CLI i.e. /clr
i.e. _MANAGED
project?