summaryrefslogtreecommitdiff
path: root/absl/log/scoped_mock_log.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/log/scoped_mock_log.h')
-rw-r--r--absl/log/scoped_mock_log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/absl/log/scoped_mock_log.h b/absl/log/scoped_mock_log.h
index 44470c16..399e604d 100644
--- a/absl/log/scoped_mock_log.h
+++ b/absl/log/scoped_mock_log.h
@@ -185,6 +185,9 @@ class ScopedMockLog final {
ForwardingSink sink_;
bool is_capturing_logs_;
+ // Until C++20, the default constructor leaves the underlying value wrapped in
+ // std::atomic uninitialized, so all constructors should be sure to initialize
+ // is_triggered_.
std::atomic<bool> is_triggered_;
};