[Boost.Config] Detect compiler support for std::current_exception
Hi all, I'm working on a Boost.Exception issue [1] and I need to detect compiler support of std::current_exception. In the issue there is a suggestion to use #if __cplusplus > 199711L but that does not work for my use case (VS2015 reports __cplusplus = 199711L). Is it possible to add a config macro for this? Or is there a good enough existing macro I can use? Thanks in advance [1] https://github.com/boostorg/exception/issues/10
On 5/27/19 7:45 PM, dariomt--- via Boost wrote:
Hi all,
I'm working on a Boost.Exception issue [1] and I need to detect compiler support of std::current_exception. In the issue there is a suggestion to use #if __cplusplus > 199711L but that does not work for my use case (VS2015 reports __cplusplus = 199711L).
MSVC defines _MSVC_LANG for this[1]. At least, it used to. However, it would be cleaner to have a dedicated macro in Boost.Config for this.
Is it possible to add a config macro for this? Or is there a good enough existing macro I can use?
I don't think there is. Something like BOOST_NO_CXX11_HDR_EXCEPTION would be useful. [1] https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-...
participants (2)
-
Andrey Semashev
-
dariomt@gmail.com