Skip to content

boost.json won't compile with visual studio and /Zc:implicitNoexcept-  #557

@tru

Description

@tru

Version of Boost

1.76.0

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 with [ 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.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions