boostorg / throw_exception

Common infrastructure for throwing exceptions
https://boost.org/libs/throw_exception
14 stars 46 forks source link

Define boost::wrapexcept even when BOOST_EXCEPTION_DISABLE is defined. #18

Closed palebedev closed 3 years ago

palebedev commented 3 years ago

Since Boost.Exception started using boost::wrapexcept in implementation of boost::exception_ptr, we need to define it even when BOOST_EXCEPTION_DISABLE is defined, otherwise it won't compile:

$ clang++ -DBOOST_EXCEPTION_DISABLE -w -x c++ /usr/include/boost/exception_ptr.hpp -fsyntax-only
In file included from /usr/include/boost/exception_ptr.hpp:9:
/usr/include/boost/exception/detail/exception_ptr.hpp:87:49: error: use of undeclared identifier 'wrapexcept'
        return exception_ptr(boost::make_shared<wrapexcept<E> >(cp));
                                                ^
1 error generated.