diff --git a/include/bitcoin/protocol/config/authority.hpp b/include/bitcoin/protocol/config/authority.hpp index b7aa32c..d22d706 100644 --- a/include/bitcoin/protocol/config/authority.hpp +++ b/include/bitcoin/protocol/config/authority.hpp @@ -46,11 +46,11 @@ class BCP_API authority /// The port is optional and will be set to zero if not provided. /// The host can be in one of two forms: /// [2001:db8::2]:port or 1.2.240.1:port. - authority(const std::string& value) NOEXCEPT(false); + authority(const std::string& value) THROWS; /// The host can be in one of three forms: /// [2001:db8::2] or 2001:db8::2 or 1.2.240.1 - authority(const std::string& host, uint16_t port) NOEXCEPT(false); + authority(const std::string& host, uint16_t port) THROWS; /// True if the port is non-zero. operator bool() const NOEXCEPT; @@ -73,7 +73,7 @@ class BCP_API authority std::string to_string() const NOEXCEPT; friend std::istream& operator>>(std::istream& input, - authority& argument) NOEXCEPT(false); + authority& argument) THROWS; friend std::ostream& operator<<(std::ostream& output, const authority& argument) NOEXCEPT; diff --git a/include/bitcoin/protocol/config/endpoint.hpp b/include/bitcoin/protocol/config/endpoint.hpp index f033b62..7c418c4 100644 --- a/include/bitcoin/protocol/config/endpoint.hpp +++ b/include/bitcoin/protocol/config/endpoint.hpp @@ -45,7 +45,7 @@ class BCP_API endpoint /// The scheme and port may be undefined, in which case the port is /// reported as zero and the scheme is reported as an empty string. /// The value is of the form: [scheme://]host[:port] - endpoint(const std::string& uri) NOEXCEPT(false); + endpoint(const std::string& uri) THROWS; endpoint(const authority& authority) NOEXCEPT; /// host may be host name or ip address. @@ -76,7 +76,7 @@ class BCP_API endpoint endpoint to_local() const NOEXCEPT; friend std::istream& operator>>(std::istream& input, - endpoint& argument) NOEXCEPT(false); + endpoint& argument) THROWS; friend std::ostream& operator<<(std::ostream& output, const endpoint& argument) NOEXCEPT; diff --git a/include/bitcoin/protocol/config/sodium.hpp b/include/bitcoin/protocol/config/sodium.hpp index c3504bc..30517fc 100644 --- a/include/bitcoin/protocol/config/sodium.hpp +++ b/include/bitcoin/protocol/config/sodium.hpp @@ -40,7 +40,7 @@ class BCP_API sodium typedef std::vector list; sodium() NOEXCEPT; - sodium(const std::string& base85) NOEXCEPT(false); + sodium(const std::string& base85) THROWS; sodium(const system::hash_digest& value) NOEXCEPT; /// True if the key is initialized. @@ -53,9 +53,9 @@ class BCP_API sodium std::string to_string() const NOEXCEPT; friend std::istream& operator>>(std::istream& input, - sodium& argument) NOEXCEPT(false); + sodium& argument) THROWS; friend std::ostream& operator<<(std::ostream& output, - const sodium& argument) NOEXCEPT(false); + const sodium& argument) THROWS; private: system::hash_digest value_; diff --git a/src/config/authority.cpp b/src/config/authority.cpp index b5e2ee8..ad56e01 100644 --- a/src/config/authority.cpp +++ b/src/config/authority.cpp @@ -49,7 +49,7 @@ static std::string to_host_name(const std::string& host) NOEXCEPT // host: [2001:db8::2] or 2001:db8::2 or 1.2.240.1 static std::string to_text(const std::string& host, - uint16_t port) NOEXCEPT(false) + uint16_t port) THROWS { std::stringstream authority; authority << to_host_name(host); @@ -123,14 +123,14 @@ BC_POP_WARNING() } // authority: [2001:db8::2]:port or 1.2.240.1:port -authority::authority(const std::string& value) NOEXCEPT(false) +authority::authority(const std::string& value) THROWS : authority() { std::stringstream(value) >> *this; } // host: [2001:db8::2] or 2001:db8::2 or 1.2.240.1 -authority::authority(const std::string& host, uint16_t port) NOEXCEPT(false) +authority::authority(const std::string& host, uint16_t port) THROWS : authority() { std::stringstream(to_text(host, port)) >> *this; @@ -168,7 +168,7 @@ std::string authority::to_string() const NOEXCEPT } std::istream& operator>>(std::istream& input, - authority& argument) NOEXCEPT(false) + authority& argument) THROWS { std::string value; input >> value; diff --git a/src/config/endpoint.cpp b/src/config/endpoint.cpp index bfe7c4f..55a5a34 100644 --- a/src/config/endpoint.cpp +++ b/src/config/endpoint.cpp @@ -37,7 +37,7 @@ BC_POP_WARNING() { } -endpoint::endpoint(const std::string& uri) NOEXCEPT(false) +endpoint::endpoint(const std::string& uri) THROWS : scheme_(), host_(), port_(0) { std::stringstream(uri) >> *this; @@ -98,7 +98,7 @@ endpoint::operator bool() const NOEXCEPT } std::istream& operator>>(std::istream& input, - endpoint& argument) NOEXCEPT(false) + endpoint& argument) THROWS { std::string value; input >> value; diff --git a/src/config/sodium.cpp b/src/config/sodium.cpp index e089d4a..2d6053e 100644 --- a/src/config/sodium.cpp +++ b/src/config/sodium.cpp @@ -35,7 +35,7 @@ sodium::sodium() NOEXCEPT { } -sodium::sodium(const std::string& base85) NOEXCEPT(false) +sodium::sodium(const std::string& base85) THROWS : sodium() { std::stringstream(base85) >> *this; @@ -66,7 +66,7 @@ std::string sodium::to_string() const NOEXCEPT BC_POP_WARNING() } -std::istream& operator>>(std::istream& input, sodium& argument) NOEXCEPT(false) +std::istream& operator>>(std::istream& input, sodium& argument) THROWS { std::string base85; input >> base85; @@ -82,7 +82,7 @@ std::istream& operator>>(std::istream& input, sodium& argument) NOEXCEPT(false) } std::ostream& operator<<(std::ostream& output, - const sodium& argument) NOEXCEPT(false) + const sodium& argument) THROWS { std::string decoded;