diff options
author | misterg <misterg@google.com> | 2018-10-24 17:02:11 -0400 |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-26 14:19:51 -0400 |
commit | a50e4f05b3d84c6a014c59a24263328242cc8236 (patch) | |
tree | 6b262d5156f04387467abbc48b4e5e98ec94e382 /googlemock/include/gmock/gmock-cardinalities.h | |
parent | 8ec8ce1c8a51076950bfa7a7886d95f4c8aed11b (diff) | |
download | googletest-a50e4f05b3d84c6a014c59a24263328242cc8236.tar.gz googletest-a50e4f05b3d84c6a014c59a24263328242cc8236.tar.bz2 googletest-a50e4f05b3d84c6a014c59a24263328242cc8236.zip |
Googletest export
Remove linked_ptr and use std::shared_ptr instead
PiperOrigin-RevId: 218571466
Diffstat (limited to 'googlemock/include/gmock/gmock-cardinalities.h')
-rw-r--r-- | googlemock/include/gmock/gmock-cardinalities.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h index f9169315..8fa25ebb 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. |