mirror of
https://github.com/google/googletest.git
synced 2025-12-08 09:47:49 +08:00
provide alternative carinality constructor for CardinalityInterface objects already managed by shared_ptr
This commit is contained in:
parent
8cfe0661bf
commit
8cc4372d76
@ -97,6 +97,9 @@ class GTEST_API_ Cardinality {
|
||||
// Constructs a Cardinality from its implementation.
|
||||
explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
|
||||
|
||||
// Constructs a Cardinality from shared_ptr.
|
||||
explicit Cardinality(std::shared_ptr<const CardinalityInterface> impl) : impl_(impl) {}
|
||||
|
||||
// Conservative estimate on the lower/upper bound of the number of
|
||||
// calls allowed.
|
||||
int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user