Applied noexcept to everything in [diagnostics] (Chapter 19)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,9 +33,9 @@ class xxx_error : public exception // at least indirectly
|
||||
{
|
||||
public:
|
||||
explicit xxx_error(const string& what_arg);
|
||||
explicit xxx_error(const char* what_arg); // extension
|
||||
explicit xxx_error(const char* what_arg);
|
||||
|
||||
virtual const char* what() const // returns what_arg
|
||||
virtual const char* what() const noexcept // returns what_arg
|
||||
};
|
||||
|
||||
} // std
|
||||
@@ -60,12 +60,12 @@ public:
|
||||
explicit logic_error(const string&);
|
||||
explicit logic_error(const char*);
|
||||
|
||||
logic_error(const logic_error&) throw();
|
||||
logic_error& operator=(const logic_error&) throw();
|
||||
logic_error(const logic_error&) _NOEXCEPT;
|
||||
logic_error& operator=(const logic_error&) _NOEXCEPT;
|
||||
|
||||
virtual ~logic_error() throw();
|
||||
virtual ~logic_error() _NOEXCEPT;
|
||||
|
||||
virtual const char* what() const throw();
|
||||
virtual const char* what() const _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI runtime_error
|
||||
@@ -77,12 +77,12 @@ public:
|
||||
explicit runtime_error(const string&);
|
||||
explicit runtime_error(const char*);
|
||||
|
||||
runtime_error(const runtime_error&) throw();
|
||||
runtime_error& operator=(const runtime_error&) throw();
|
||||
runtime_error(const runtime_error&) _NOEXCEPT;
|
||||
runtime_error& operator=(const runtime_error&) _NOEXCEPT;
|
||||
|
||||
virtual ~runtime_error() throw();
|
||||
virtual ~runtime_error() _NOEXCEPT;
|
||||
|
||||
virtual const char* what() const throw();
|
||||
virtual const char* what() const _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI domain_error
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit domain_error(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit domain_error(const char* __s) : logic_error(__s) {}
|
||||
|
||||
virtual ~domain_error() throw();
|
||||
virtual ~domain_error() _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI invalid_argument
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const char* __s) : logic_error(__s) {}
|
||||
|
||||
virtual ~invalid_argument() throw();
|
||||
virtual ~invalid_argument() _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI length_error
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {}
|
||||
|
||||
virtual ~length_error() throw();
|
||||
virtual ~length_error() _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI out_of_range
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit out_of_range(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit out_of_range(const char* __s) : logic_error(__s) {}
|
||||
|
||||
virtual ~out_of_range() throw();
|
||||
virtual ~out_of_range() _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI range_error
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit range_error(const string& __s) : runtime_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit range_error(const char* __s) : runtime_error(__s) {}
|
||||
|
||||
virtual ~range_error() throw();
|
||||
virtual ~range_error() _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI overflow_error
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit overflow_error(const string& __s) : runtime_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit overflow_error(const char* __s) : runtime_error(__s) {}
|
||||
|
||||
virtual ~overflow_error() throw();
|
||||
virtual ~overflow_error() _NOEXCEPT;
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI underflow_error
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit underflow_error(const string& __s) : runtime_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit underflow_error(const char* __s) : runtime_error(__s) {}
|
||||
|
||||
virtual ~underflow_error() throw();
|
||||
virtual ~underflow_error() _NOEXCEPT;
|
||||
};
|
||||
|
||||
} // std
|
||||
|
Reference in New Issue
Block a user