From 8fc2901fad2cdece588476ace9a1a335a2582e42 Mon Sep 17 00:00:00 2001 From: Andrzej Krzemienski Date: Sat, 14 Jun 2014 00:46:24 +0200 Subject: [PATCH] explicit operator bool becomes noexcept --- doc/20_reference.qbk | 5 ++--- doc/html/boost_optional/reference/detailed_semantics.html | 6 ++---- doc/html/index.html | 2 +- doc/html/optional/reference.html | 2 +- include/boost/optional/optional.hpp | 5 +++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/doc/20_reference.qbk b/doc/20_reference.qbk index 82cd932..691f475 100644 --- a/doc/20_reference.qbk +++ b/doc/20_reference.qbk @@ -85,7 +85,7 @@ T const* get_ptr() const ; ``[link reference_optional_get_ptr __GO_TO__]`` T* get_ptr() ; ``[link reference_optional_get_ptr __GO_TO__]`` - explicit operator bool() const ; ``[link reference_optional_operator_bool __GO_TO__]`` + explicit operator bool() const noexcept ; ``[link reference_optional_operator_bool __GO_TO__]`` bool operator!() const noexcept ; ``[link reference_optional_operator_not __GO_TO__]`` @@ -989,10 +989,9 @@ __SPACE__ [#reference_optional_operator_bool] -[: `explicit optional::operator bool() const ;`] +[: `explicit optional::operator bool() const noexcept ;`] * [*Returns:] `get_ptr() != 0`. -* [*Throws:] Nothing. * [*Notes:] On compilers that do not support explicit conversion operators this falls back to safe-bool idiom. * [*Example:] `` diff --git a/doc/html/boost_optional/reference/detailed_semantics.html b/doc/html/boost_optional/reference/detailed_semantics.html index 5d71e1d..05ad5da 100644 --- a/doc/html/boost_optional/reference/detailed_semantics.html +++ b/doc/html/boost_optional/reference/detailed_semantics.html @@ -1572,15 +1572,13 @@

explicit optional<T>::operator bool() - const ; + const noexcept + ;

  • Returns: get_ptr() != 0.
  • -
  • - Throws: Nothing. -
  • Notes: On compilers that do not support explicit conversion operators this falls back to safe-bool idiom. diff --git a/doc/html/index.html b/doc/html/index.html index af4424e..74b30e5 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -133,7 +133,7 @@
- +

Last revised: June 08, 2014 at 18:14:37 GMT

Last revised: June 13, 2014 at 21:36:29 GMT


diff --git a/doc/html/optional/reference.html b/doc/html/optional/reference.html index a1a6d0e..9ec144c 100644 --- a/doc/html/optional/reference.html +++ b/doc/html/optional/reference.html @@ -109,7 +109,7 @@ T const* get_ptr() const ; R T* get_ptr() ; R - explicit operator bool() const ; R + explicit operator bool() const noexcept ; R bool operator!() const noexcept ; R diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index a9763a5..d5e3394 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -49,7 +50,7 @@ #include #include #include -#include + #include #include @@ -1075,7 +1076,7 @@ class optional : public optional_detail::optional_base bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; } - BOOST_EXPLICIT_OPERATOR_BOOL() + BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT() } ; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES