|
Boost : |
From: dariomt_at_[hidden]
Date: 2019-05-29 15:13:36
>
>
> > 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.
>
Totally agree.
>
> > 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.
>
I would need to detect support for std::current_exception, not the presence
of header <exception>, so I would think that
BOOST_NO_CXX11_CURRENT_EXCEPTION is what I need, right?
So that I can
#ifndef BOOST_NO_CXX11_CURRENT_EXCEPTION
// I can use std::current_exception() unconditionally here
#endif
Should I open an issue in github for Boost.Config?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk