Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c7b3428

Browse files
committedSep 22, 2020
Add noexcept operator to docopt::value::isBool, isString, isLong, isStringList
1 parent 6f5de76 commit c7b3428

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎docopt_value.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ namespace docopt {
5151
explicit operator bool() const { return kind_ != Kind::Empty; }
5252

5353
// Test the type contained by this value object
54-
bool isBool() const { return kind_==Kind::Bool; }
55-
bool isString() const { return kind_==Kind::String; }
56-
bool isLong() const { return kind_==Kind::Long; }
57-
bool isStringList() const { return kind_==Kind::StringList; }
54+
bool isBool() const noexcept { return kind_==Kind::Bool; }
55+
bool isString() const noexcept { return kind_==Kind::String; }
56+
bool isLong() const noexcept { return kind_==Kind::Long; }
57+
bool isStringList() const noexcept { return kind_==Kind::StringList; }
5858

5959
// Throws std::invalid_argument if the type does not match
6060
bool asBool() const;

0 commit comments

Comments
 (0)
Please sign in to comment.