diff options
author | kosak <kosak@google.com> | 2015-07-13 21:19:43 (GMT) |
---|---|---|
committer | kosak <kosak@google.com> | 2015-07-13 21:19:43 (GMT) |
commit | d86a723ed95229f7412e72daafd2c0a89c705830 (patch) | |
tree | 40f1ea74e3780f0150439662d44e0e7e1f5270a3 | |
parent | 9b1a944ec48b7f84ad2f4466ed3babd232a20db5 (diff) | |
download | googletest-d86a723ed95229f7412e72daafd2c0a89c705830.zip googletest-d86a723ed95229f7412e72daafd2c0a89c705830.tar.gz googletest-d86a723ed95229f7412e72daafd2c0a89c705830.tar.bz2 |
Mark the default constructor of Matcher<> explicit.
This prevents implicitly constructing a matcher from {}.
-rw-r--r-- | include/gmock/gmock-matchers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gmock/gmock-matchers.h b/include/gmock/gmock-matchers.h index 58fe3b6..67cbe0f 100644 --- a/include/gmock/gmock-matchers.h +++ b/include/gmock/gmock-matchers.h @@ -321,7 +321,7 @@ class Matcher : public internal::MatcherBase<T> { // Constructs a null matcher. Needed for storing Matcher objects in STL // containers. A default-constructed matcher is not yet initialized. You // cannot use it until a valid value has been assigned to it. - Matcher() {} + explicit Matcher() {} // NOLINT // Constructs a matcher from its implementation. explicit Matcher(const MatcherInterface<T>* impl) |