Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/bitcoin/protocol/config/authority.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions include/bitcoin/protocol/config/endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions include/bitcoin/protocol/config/sodium.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BCP_API sodium
typedef std::vector<sodium> 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.
Expand All @@ -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_;
Expand Down
8 changes: 4 additions & 4 deletions src/config/authority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/config/endpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/config/sodium.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand Down
Loading