aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/stdexcept
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-12-06 20:03:25 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-12-06 20:03:25 +0000
commit8535715d0fb7c430787c257a9fc14cb34794e676 (patch)
treed7d90c64c9fb734a886b94cbda14b7158939c565 /libstdc++-v3/include/std/stdexcept
parent0e642d0671db79acb4bccc4268e461fdcf5c1cdf (diff)
downloadgcc-8535715d0fb7c430787c257a9fc14cb34794e676.zip
gcc-8535715d0fb7c430787c257a9fc14cb34794e676.tar.gz
gcc-8535715d0fb7c430787c257a9fc14cb34794e676.tar.bz2
re PR libstdc++/51438 (std::exception and derived classes are not compatible with std::nested_exception and C++11 in general)
2011-12-06 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/51438 * libsupc++/nested_exception.h (nested_exception::~nested_exception): Declare noexcept. * libsupc++/nested_exception.cc: Adjust. * testsuite/18_support/nested_exception/51438.cc: New. * testsuite/18_support/nested_exception/throw_with_nested.cc: Adjust. * testsuite/18_support/nested_exception/rethrow_if_nested.cc: Likewise. * src/shared_ptr.cc: Use noexcept where appropriate. * include/std/system_error: Likewise. * include/std/functional: Likewise. * include/bits/shared_ptr_base.h: Likewise. * src/stdexcept.cc: Use _GLIBCXX_USE_NOEXCEPT where appropriate. * include/std/stdexcept: Likewise. * libsupc++/bad_cast.cc: Likewise. * libsupc++/bad_typeid.cc: Likewise. * libsupc++/eh_exception.cc: Likewise. * libsupc++/typeinfo: Likewise. * libsupc++/exception: Likewise. * libsupc++/eh_ptr.cc: Likewise. * libsupc++/bad_alloc.cc: Likewise. * libsupc++/exception_ptr.h: Likewise. * include/std/chrono: Use noexcept where appropriate. * src/chrono.cc: Likewise. From-SVN: r182064
Diffstat (limited to 'libstdc++-v3/include/std/stdexcept')
-rw-r--r--libstdc++-v3/include/std/stdexcept22
1 files changed, 11 insertions, 11 deletions
diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept
index a461795..2cbf207 100644
--- a/libstdc++-v3/include/std/stdexcept
+++ b/libstdc++-v3/include/std/stdexcept
@@ -62,12 +62,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
explicit
logic_error(const string& __arg);
- virtual ~logic_error() throw();
+ virtual ~logic_error() _GLIBCXX_USE_NOEXCEPT;
/** Returns a C-style character string describing the general cause of
* the current error (the same string passed to the ctor). */
virtual const char*
- what() const throw();
+ what() const _GLIBCXX_USE_NOEXCEPT;
};
/** Thrown by the library, or by you, to report domain errors (domain in
@@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit domain_error(const string& __arg);
- virtual ~domain_error() throw();
+ virtual ~domain_error() _GLIBCXX_USE_NOEXCEPT;
};
/** Thrown to report invalid arguments to functions. */
@@ -84,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit invalid_argument(const string& __arg);
- virtual ~invalid_argument() throw();
+ virtual ~invalid_argument() _GLIBCXX_USE_NOEXCEPT;
};
/** Thrown when an object is constructed that would exceed its maximum
@@ -93,7 +93,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit length_error(const string& __arg);
- virtual ~length_error() throw();
+ virtual ~length_error() _GLIBCXX_USE_NOEXCEPT;
};
/** This represents an argument whose value is not within the expected
@@ -102,7 +102,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit out_of_range(const string& __arg);
- virtual ~out_of_range() throw();
+ virtual ~out_of_range() _GLIBCXX_USE_NOEXCEPT;
};
/** Runtime errors represent problems outside the scope of a program;
@@ -119,12 +119,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
explicit
runtime_error(const string& __arg);
- virtual ~runtime_error() throw();
+ virtual ~runtime_error() _GLIBCXX_USE_NOEXCEPT;
/** Returns a C-style character string describing the general cause of
* the current error (the same string passed to the ctor). */
virtual const char*
- what() const throw();
+ what() const _GLIBCXX_USE_NOEXCEPT;
};
/** Thrown to indicate range errors in internal computations. */
@@ -132,7 +132,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit range_error(const string& __arg);
- virtual ~range_error() throw();
+ virtual ~range_error() _GLIBCXX_USE_NOEXCEPT;
};
/** Thrown to indicate arithmetic overflow. */
@@ -140,7 +140,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit overflow_error(const string& __arg);
- virtual ~overflow_error() throw();
+ virtual ~overflow_error() _GLIBCXX_USE_NOEXCEPT;
};
/** Thrown to indicate arithmetic underflow. */
@@ -148,7 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
public:
explicit underflow_error(const string& __arg);
- virtual ~underflow_error() throw();
+ virtual ~underflow_error() _GLIBCXX_USE_NOEXCEPT;
};
// @} group exceptions