summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/src/stdexcept.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-01-30 07:44:22 +0000
committerdim <dim@FreeBSD.org>2014-01-30 07:44:22 +0000
commit0b319638e352dd16f2e5a243bd3826d37eef1680 (patch)
treeadd3759d4df7ee10d814c3b2561c3c28fcd9cef2 /contrib/libc++/src/stdexcept.cpp
parent9cecf9778c1472e916ad20086c11e4bf332ba6ad (diff)
parentc3e10da3dc0f616b78ccf85206fdcf4c92f8ac85 (diff)
downloadFreeBSD-src-0b319638e352dd16f2e5a243bd3826d37eef1680.zip
FreeBSD-src-0b319638e352dd16f2e5a243bd3826d37eef1680.tar.gz
Import libc++ 3.4 release. This contains a lot of bugfixes, and some
preliminary support for C++1y. MFC after: 3 weeks
Diffstat (limited to 'contrib/libc++/src/stdexcept.cpp')
-rw-r--r--contrib/libc++/src/stdexcept.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/contrib/libc++/src/stdexcept.cpp b/contrib/libc++/src/stdexcept.cpp
index 8d25f3e..a4207d6 100644
--- a/contrib/libc++/src/stdexcept.cpp
+++ b/contrib/libc++/src/stdexcept.cpp
@@ -28,7 +28,9 @@
// Note: optimize for size
+#if ! defined(_LIBCPP_MSVC)
#pragma GCC visibility push(hidden)
+#endif
namespace
{
@@ -47,9 +49,9 @@ private:
count_t& count() const _NOEXCEPT {return (count_t&)(*(str_ - sizeof(count_t)));}
public:
explicit __libcpp_nmstr(const char* msg);
- __libcpp_nmstr(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW;
- __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW;
- ~__libcpp_nmstr() _LIBCPP_CANTTHROW;
+ __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT;
+ __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT;
+ ~__libcpp_nmstr();
const char* c_str() const _NOEXCEPT {return str_;}
};
@@ -65,14 +67,14 @@ __libcpp_nmstr::__libcpp_nmstr(const char* msg)
}
inline
-__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s)
+__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT
: str_(s.str_)
{
__sync_add_and_fetch(&count(), 1);
}
__libcpp_nmstr&
-__libcpp_nmstr::operator=(const __libcpp_nmstr& s)
+__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT
{
const char* p = str_;
str_ = s.str_;
@@ -91,7 +93,9 @@ __libcpp_nmstr::~__libcpp_nmstr()
}
+#if ! defined(_LIBCPP_MSVC)
#pragma GCC visibility pop
+#endif
namespace std // purposefully not using versioning namespace
{
@@ -123,7 +127,7 @@ logic_error::operator=(const logic_error& le) _NOEXCEPT
return *this;
}
-#ifndef _LIBCPPABI_VERSION
+#if !defined(_LIBCPPABI_VERSION) && !defined(LIBSTDCXX)
logic_error::~logic_error() _NOEXCEPT
{
@@ -167,7 +171,7 @@ runtime_error::operator=(const runtime_error& le) _NOEXCEPT
return *this;
}
-#ifndef _LIBCPPABI_VERSION
+#if !defined(_LIBCPPABI_VERSION) && !defined(LIBSTDCXX)
runtime_error::~runtime_error() _NOEXCEPT
{
OpenPOWER on IntegriCloud