chenBright commented on code in PR #3611:
URL: https://github.com/apache/brpc/pull/3611#discussion_r4313930894
##########
test/bvar_histogram_unittest.cpp:
##########
@@ -731,14 +732,33 @@ TEST_F(HistogramTest, window) {
}
TEST_F(HistogramTest, window_forgets_old_samples) {
+ // Own the unscheduled sampler until after h's destructor calls destroy().
+ std::unique_ptr<bvar::Histogram::sampler_type> sampler;
bvar::Histogram h(bvar::Histogram::BucketSchema({10, 20, 30}));
+ sampler = std::make_unique<bvar::Histogram::sampler_type>(&h);
Review Comment:
The repository already requires C++14 or newer. CMake propagates this
requirement to the test targets, Make uses C++14/C++17, and Bazel uses C++17.
Therefore, `std::make_unique` is supported by the current build configurations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]