mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Add <experimental/memory_resource>
Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20007 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -80,6 +80,10 @@ template <class E> void rethrow_if_nested(const E& e);
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#if defined(_LIBCPP_HAS_NO_EXCEPTIONS)
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
@@ -251,4 +255,19 @@ rethrow_if_nested(const _Ep&, typename enable_if<
|
||||
|
||||
} // std
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Exception>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline void __libcpp_throw(_Exception const& __e) {
|
||||
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
|
||||
throw __e;
|
||||
#else
|
||||
_VSTD::fprintf(stderr, "%s\n", __e.what());
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_EXCEPTION
|
||||
|
||||
Reference in New Issue
Block a user