Useful or not, from you.
json boost.json won't compile with visual studio and `/Zc:implicitNoexcept-`

Version of Boost


Steps necessary to reproduce the problem

include boost/json.hpp anywhere and compile your program with /Zc:implicitNoexcept-

All relevant compiler information

Visual Studio 2019

We need this flag for our project to avoid a bigger refactoring, but with boost.json included we get the following error:

C:\.conan\c5dbf7\1\include\boost/json/pilfer.hpp(191): error C2338:
C:\.conan\c5dbf7\1\include\boost/json/value.hpp(3522): note: see reference to function template instantiation 'boost::json::value &&boost::json::pilfer<boost::json::value&>(T) noexcept' being compiled
            T=boost::json::value &

I understand this is non-standard - so I am just looking for a workaround we can apply to our boost sources until we can get rid of the implicitNoexcept flag.


That's a useful answer
Without any help


I understand that sentiment. On the other hand we have been building boost with this flag since version 1.23 or something similar and boost.json is the first module it breaks on. So maybe there is a simple fix here that can make it work?