noexcept for Chapter 22 [localization].

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-05-31 15:34:58 +00:00
parent c26fd8061e
commit c983454d30
3 changed files with 91 additions and 91 deletions

View File

@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class locale;
template <class _Facet> bool has_facet(const locale&) throw();
template <class _Facet> bool has_facet(const locale&) _NOEXCEPT;
template <class _Facet> const _Facet& use_facet(const locale&);
class _LIBCPP_VISIBLE locale
@@ -49,8 +49,8 @@ public:
all = collate | ctype | monetary | numeric | time | messages;
// construct/copy/destroy:
locale() throw();
locale(const locale&) throw();
locale() _NOEXCEPT;
locale(const locale&) _NOEXCEPT;
explicit locale(const char*);
explicit locale(const string&);
locale(const locale&, const char*, category);
@@ -59,9 +59,9 @@ public:
_LIBCPP_INLINE_VISIBILITY locale(const locale&, _Facet*);
locale(const locale&, const locale&, category);
~locale() throw();
~locale();
const locale& operator=(const locale&) throw();
const locale& operator=(const locale&) _NOEXCEPT;
template <class _Facet> locale combine(const locale&) const;
@@ -86,7 +86,7 @@ private:
bool has_facet(id&) const;
const facet* use_facet(id&) const;
template <class _Facet> friend bool has_facet(const locale&) throw();
template <class _Facet> friend bool has_facet(const locale&) _NOEXCEPT;
template <class _Facet> friend const _Facet& use_facet(const locale&);
};
@@ -146,7 +146,7 @@ locale::combine(const locale& __other) const
template <class _Facet>
inline _LIBCPP_INLINE_VISIBILITY
bool
has_facet(const locale& __l) throw()
has_facet(const locale& __l) _NOEXCEPT
{
return __l.has_facet(_Facet::id);
}
@@ -535,8 +535,8 @@ public:
#else
static const size_t table_size = 256; // FIXME: Don't hardcode this.
#endif
_LIBCPP_ALWAYS_INLINE const mask* table() const throw() {return __tab_;}
static const mask* classic_table() throw();
_LIBCPP_ALWAYS_INLINE const mask* table() const _NOEXCEPT {return __tab_;}
static const mask* classic_table() _NOEXCEPT;
protected:
~ctype();
@@ -755,13 +755,13 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int encoding() const throw()
int encoding() const _NOEXCEPT
{
return do_encoding();
}
_LIBCPP_ALWAYS_INLINE
bool always_noconv() const throw()
bool always_noconv() const _NOEXCEPT
{
return do_always_noconv();
}
@@ -773,7 +773,7 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int max_length() const throw()
int max_length() const _NOEXCEPT
{
return do_max_length();
}
@@ -795,10 +795,10 @@ protected:
intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
virtual result do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
virtual int do_encoding() const throw();
virtual bool do_always_noconv() const throw();
virtual int do_encoding() const _NOEXCEPT;
virtual bool do_always_noconv() const _NOEXCEPT;
virtual int do_length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
virtual int do_max_length() const throw();
virtual int do_max_length() const _NOEXCEPT;
};
// template <> class codecvt<wchar_t, char, mbstate_t>
@@ -840,13 +840,13 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int encoding() const throw()
int encoding() const _NOEXCEPT
{
return do_encoding();
}
_LIBCPP_ALWAYS_INLINE
bool always_noconv() const throw()
bool always_noconv() const _NOEXCEPT
{
return do_always_noconv();
}
@@ -858,7 +858,7 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int max_length() const throw()
int max_length() const _NOEXCEPT
{
return do_max_length();
}
@@ -878,10 +878,10 @@ protected:
intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
virtual result do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
virtual int do_encoding() const throw();
virtual bool do_always_noconv() const throw();
virtual int do_encoding() const _NOEXCEPT;
virtual bool do_always_noconv() const _NOEXCEPT;
virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
virtual int do_max_length() const throw();
virtual int do_max_length() const _NOEXCEPT;
};
// template <> class codecvt<char16_t, char, mbstate_t>
@@ -924,13 +924,13 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int encoding() const throw()
int encoding() const _NOEXCEPT
{
return do_encoding();
}
_LIBCPP_ALWAYS_INLINE
bool always_noconv() const throw()
bool always_noconv() const _NOEXCEPT
{
return do_always_noconv();
}
@@ -942,7 +942,7 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int max_length() const throw()
int max_length() const _NOEXCEPT
{
return do_max_length();
}
@@ -964,10 +964,10 @@ protected:
intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
virtual result do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
virtual int do_encoding() const throw();
virtual bool do_always_noconv() const throw();
virtual int do_encoding() const _NOEXCEPT;
virtual bool do_always_noconv() const _NOEXCEPT;
virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
virtual int do_max_length() const throw();
virtual int do_max_length() const _NOEXCEPT;
};
// template <> class codecvt<char32_t, char, mbstate_t>
@@ -1010,13 +1010,13 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int encoding() const throw()
int encoding() const _NOEXCEPT
{
return do_encoding();
}
_LIBCPP_ALWAYS_INLINE
bool always_noconv() const throw()
bool always_noconv() const _NOEXCEPT
{
return do_always_noconv();
}
@@ -1028,7 +1028,7 @@ public:
}
_LIBCPP_ALWAYS_INLINE
int max_length() const throw()
int max_length() const _NOEXCEPT
{
return do_max_length();
}
@@ -1050,10 +1050,10 @@ protected:
intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
virtual result do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
virtual int do_encoding() const throw();
virtual bool do_always_noconv() const throw();
virtual int do_encoding() const _NOEXCEPT;
virtual bool do_always_noconv() const _NOEXCEPT;
virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
virtual int do_max_length() const throw();
virtual int do_max_length() const _NOEXCEPT;
};
// template <class _InternT, class _ExternT, class _StateT> class codecvt_byname

View File

@@ -36,8 +36,8 @@ public:
all = collate | ctype | monetary | numeric | time | messages;
// construct/copy/destroy:
locale() throw();
locale(const locale& other) throw();
locale() noexcept;
locale(const locale& other) noexcept;
explicit locale(const char* std_name);
explicit locale(const string& std_name);
locale(const locale& other, const char* std_name, category);
@@ -45,9 +45,9 @@ public:
template <class Facet> locale(const locale& other, Facet* f);
locale(const locale& other, const locale& one, category);
~locale() throw(); // not virtual
~locale(); // not virtual
const locale& operator=(const locale& other) throw();
const locale& operator=(const locale& other) noexcept;
template <class Facet> locale combine(const locale& other) const;
@@ -65,7 +65,7 @@ public:
};
template <class Facet> const Facet& use_facet(const locale&);
template <class Facet> bool has_facet(const locale&) throw();
template <class Facet> bool has_facet(const locale&) noexcept;
// 22.3.3, convenience interfaces:
template <class charT> bool isspace (charT c, const locale& loc);