Skip to content

Commit 8c0cb81

Browse files
Koladata Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 869796535 Change-Id: I17e15e5f1d259ce5e90757492b97936c4ad34325
1 parent fc4fb28 commit 8c0cb81

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

koladata/functor/parallel/context_guard.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include <cstddef>
1919
#include <memory>
20-
#include <utility>
2120

2221
#include "absl/log/check.h"
2322

@@ -28,11 +27,6 @@ class ContextGuard final {
2827
public:
2928
ContextGuard() = default;
3029

31-
template <typename T, typename... Args>
32-
explicit ContextGuard(std::in_place_type_t<T>, Args&&... args) {
33-
init<T>(std::forward<Args>(args)...);
34-
}
35-
3630
~ContextGuard() {
3731
if (destructor_fn_ != nullptr) {
3832
destructor_fn_(buffer_);

koladata/functor/parallel/context_guard_test.cc

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,7 @@ class TestScopeGuard {
3838
std::function<void()> on_destruct_fn_;
3939
};
4040

41-
TEST(ContextGuardTest, TestScopeGuardInplaceCtor) {
42-
bool constructed = false;
43-
bool destructed = false;
44-
std::function<void()> on_construct = [&] { constructed = true; };
45-
std::function<void()> on_destruct = [&] { destructed = true; };
46-
{
47-
ContextGuard context_guard(std::in_place_type_t<TestScopeGuard>(),
48-
on_construct, on_destruct);
49-
EXPECT_TRUE(constructed);
50-
EXPECT_FALSE(destructed);
51-
}
52-
EXPECT_TRUE(destructed);
53-
}
54-
55-
TEST(ContextGuardTest, TestScopeGuardInit) {
41+
TEST(ContextGuardTest, TestScopeGuard) {
5642
bool constructed = false;
5743
bool destructed = false;
5844
std::function<void()> on_construct = [&] { constructed = true; };

0 commit comments

Comments
 (0)