Skip to content

Commit 10b3b89

Browse files
committed
Fix compilation
1 parent 8755130 commit 10b3b89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bindings/profilers/wall.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <limits>
2020
#include <memory>
2121
#include <mutex>
22+
#include <type_traits>
2223
#include <vector>
2324

2425
#include <nan.h>
@@ -121,7 +122,7 @@ class ProtectedProfilerMap {
121122
}
122123

123124
WallProfiler* RemoveProfilerForIsolate(const v8::Isolate* isolate) {
124-
return UpdateProfilers([isolate, this](auto map) {
125+
return UpdateProfilers([isolate](auto map) {
125126
auto it = map->find(isolate);
126127
if (it != map->end()) {
127128
auto profiler = it->second;
@@ -192,7 +193,7 @@ class ProtectedProfilerMap {
192193
using ProfilerMap = std::unordered_map<const Isolate*, WallProfiler*>;
193194

194195
template <typename F>
195-
typename std::result_of<F(ProfilerMap*)>::type UpdateProfilers(F updateFn) {
196+
std::invoke_result_t<F, ProfilerMap*> UpdateProfilers(F updateFn) {
196197
// use mutex to prevent two isolates of updating profilers concurrently
197198
std::lock_guard<std::mutex> lock(update_mutex_);
198199

0 commit comments

Comments
 (0)