Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2013-08-22 19:39:03 +00:00
parent 5b7519eb15
commit e31c432a33
2 changed files with 5 additions and 9 deletions

View File

@ -191,10 +191,6 @@
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS #define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
#endif #endif
#ifndef _LIBCPP_CANTTHROW
#define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__))
#endif
#ifndef _LIBCPP_ALWAYS_INLINE #ifndef _LIBCPP_ALWAYS_INLINE
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
#endif #endif

View File

@ -47,9 +47,9 @@ private:
count_t& count() const _NOEXCEPT {return (count_t&)(*(str_ - sizeof(count_t)));} count_t& count() const _NOEXCEPT {return (count_t&)(*(str_ - sizeof(count_t)));}
public: public:
explicit __libcpp_nmstr(const char* msg); explicit __libcpp_nmstr(const char* msg);
__libcpp_nmstr(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT;
__libcpp_nmstr& operator=(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT;
~__libcpp_nmstr() _LIBCPP_CANTTHROW; ~__libcpp_nmstr();
const char* c_str() const _NOEXCEPT {return str_;} const char* c_str() const _NOEXCEPT {return str_;}
}; };
@ -65,14 +65,14 @@ __libcpp_nmstr::__libcpp_nmstr(const char* msg)
} }
inline inline
__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) __libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT
: str_(s.str_) : str_(s.str_)
{ {
__sync_add_and_fetch(&count(), 1); __sync_add_and_fetch(&count(), 1);
} }
__libcpp_nmstr& __libcpp_nmstr&
__libcpp_nmstr::operator=(const __libcpp_nmstr& s) __libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT
{ {
const char* p = str_; const char* p = str_;
str_ = s.str_; str_ = s.str_;