about summary refs log tree commit diff
path: root/absl/random/mocking_bit_gen.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/random/mocking_bit_gen.h')
-rw-r--r--absl/random/mocking_bit_gen.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/absl/random/mocking_bit_gen.h b/absl/random/mocking_bit_gen.h
index 36cef91113e3..3d8a979e734f 100644
--- a/absl/random/mocking_bit_gen.h
+++ b/absl/random/mocking_bit_gen.h
@@ -100,7 +100,9 @@ class MockingBitGen : public absl::random_internal::MockingBitGenBase {
  public:
   MockingBitGen() {}
 
-  ~MockingBitGen() override;
+  ~MockingBitGen() override {
+    for (const auto& del : deleters_) del();
+  }
 
  private:
   template <typename DistrT, typename... Args>
@@ -182,10 +184,10 @@ namespace random_internal {
 
 template <>
 struct DistributionCaller<absl::MockingBitGen> {
-  template <typename DistrT, typename FormatT, typename... Args>
+  template <typename DistrT, typename... Args>
   static typename DistrT::result_type Call(absl::MockingBitGen* gen,
                                            Args&&... args) {
-    return gen->template Call<DistrT, FormatT>(std::forward<Args>(args)...);
+    return gen->template Call<DistrT>(std::forward<Args>(args)...);
   }
 };