summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-cardinalities.h
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2018-10-29 15:09:33 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-29 17:46:16 (GMT)
commit80b43d900b8ed44e16b306682d47d73175cecc7f (patch)
tree9fcb941d659988961bf0c3150b704bd30a37580f /googlemock/include/gmock/gmock-cardinalities.h
parent2e308484d9693f8251748c295f6ed7ed25d767eb (diff)
downloadgoogletest-80b43d900b8ed44e16b306682d47d73175cecc7f.zip
googletest-80b43d900b8ed44e16b306682d47d73175cecc7f.tar.gz
googletest-80b43d900b8ed44e16b306682d47d73175cecc7f.tar.bz2
Googletest export
Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 219129336
Diffstat (limited to 'googlemock/include/gmock/gmock-cardinalities.h')
-rw-r--r--googlemock/include/gmock/gmock-cardinalities.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h
index f916931..8fa25eb 100644
--- a/googlemock/include/gmock/gmock-cardinalities.h
+++ b/googlemock/include/gmock/gmock-cardinalities.h
@@ -40,6 +40,7 @@
#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
#include <limits.h>
+#include <memory>
#include <ostream> // NOLINT
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
@@ -81,9 +82,8 @@ class CardinalityInterface {
// A Cardinality is a copyable and IMMUTABLE (except by assignment)
// object that specifies how many times a mock function is expected to
-// be called. The implementation of Cardinality is just a linked_ptr
-// to const CardinalityInterface, so copying is fairly cheap.
-// Don't inherit from Cardinality!
+// be called. The implementation of Cardinality is just a std::shared_ptr
+// to const CardinalityInterface. Don't inherit from Cardinality!
class GTEST_API_ Cardinality {
public:
// Constructs a null cardinality. Needed for storing Cardinality
@@ -123,7 +123,7 @@ class GTEST_API_ Cardinality {
::std::ostream* os);
private:
- internal::linked_ptr<const CardinalityInterface> impl_;
+ std::shared_ptr<const CardinalityInterface> impl_;
};
// Creates a cardinality that allows at least n calls.