Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
gcc 11.x fixes
[src/app-framework-binder.git]
/
include
/
afb
/
c++
/
binding-wrap.hpp
diff --git
a/include/afb/c++/binding-wrap.hpp
b/include/afb/c++/binding-wrap.hpp
index
f94d1bc
..
b798cf1
100644
(file)
--- a/
include/afb/c++/binding-wrap.hpp
+++ b/
include/afb/c++/binding-wrap.hpp
@@
-300,6
+300,7
@@
public:
friend class req;
afb_req_t req_;
contextclass(afb_req_t r) : req_(r) {}
friend class req;
afb_req_t req_;
contextclass(afb_req_t r) : req_(r) {}
+ static void default_destroyer(T*t) { delete t; }
public:
inline operator T *() const { return get(); }
public:
inline operator T *() const { return get(); }
@@
-312,7
+313,7
@@
public:
nullptr));
}
nullptr));
}
- inline void set(T *value, void (*destroyer)(T*) =
[](T*t){delete t;}
) const {
+ inline void set(T *value, void (*destroyer)(T*) =
default_destroyer
) const {
afb_req_context(req_, 1,
nullptr,
reinterpret_cast<void(*)(void*)>(destroyer),
afb_req_context(req_, 1,
nullptr,
reinterpret_cast<void(*)(void*)>(destroyer),