Commit 84b63c01 by Jonathan Wakely Committed by Jonathan Wakely

future: Use noexcept.

2011-05-28  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future: Use noexcept.
	* src/future.cc: Likewise.

From-SVN: r174368
parent 76aa42d2
2011-05-28 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/std/future: Use noexcept.
* src/future.cc: Likewise.
2011-05-27 Jonathan Wakely <jwakely.gcc@gmail.com> 2011-05-27 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/std/thread (this_thread::sleep_until): Move after sleep_for. * include/std/thread (this_thread::sleep_until): Move after sleep_for.
......
...@@ -28,10 +28,10 @@ namespace ...@@ -28,10 +28,10 @@ namespace
{ {
struct future_error_category : public std::error_category struct future_error_category : public std::error_category
{ {
future_error_category() {} future_error_category() noexcept {}
virtual const char* virtual const char*
name() const name() const noexcept
{ return "future"; } { return "future"; }
virtual std::string message(int __ec) const virtual std::string message(int __ec) const
...@@ -60,7 +60,7 @@ namespace ...@@ -60,7 +60,7 @@ namespace
}; };
const future_error_category& const future_error_category&
__future_category_instance() __future_category_instance() noexcept
{ {
static const future_error_category __fec; static const future_error_category __fec;
return __fec; return __fec;
...@@ -71,13 +71,13 @@ namespace std _GLIBCXX_VISIBILITY(default) ...@@ -71,13 +71,13 @@ namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
const error_category& future_category() const error_category& future_category() noexcept
{ return __future_category_instance(); } { return __future_category_instance(); }
future_error::~future_error() throw() { } future_error::~future_error() noexcept { }
const char* const char*
future_error::what() const throw() { return _M_code.message().c_str(); } future_error::what() const noexcept { return _M_code.message().c_str(); }
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
&& defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_ATOMIC_BUILTINS_4)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment