[MacPorts] #57578: __has_feature(cxx_exceptions) returns true but fails to compile std::uncaught_exceptions()
MacPorts
noreply at macports.org
Mon Nov 12 07:11:38 UTC 2018
#57578: __has_feature(cxx_exceptions) returns true but fails to compile
std::uncaught_exceptions()
------------------------+----------------------
Reporter: noloader | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: clang-6.0 |
------------------------+----------------------
Comment (by jmroot):
Replying to [ticket:57578 noloader]:
> According to the LLVM 3.6 release notes
(https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-
exceptions-macro), I believe I am using the correct feature test:
>
> To reliably test if C++ exceptions are enabled,
> use `__EXCEPTIONS && __has_feature(cxx_exceptions)`,
> else things won’t work in all versions of Clang in
> Objective-C++ files.
This doesn't say anything about C++17 features, just that it tells you
whether C++ exceptions are enabled at all. Since uncaught_exceptions is
part of the standard library and not the compiler, I would guess its
absence isn't a problem with clang++ as such.
--
Ticket URL: <https://trac.macports.org/ticket/57578#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list