A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'actor-yield' of github.com:Takishipp/simgrid into actor-yield
[simgrid.git]
/
include
/
xbt
/
functional.hpp
diff --git
a/include/xbt/functional.hpp
b/include/xbt/functional.hpp
index 6f093af6339c2cbdfa0469b630c6b2d813423903..64c3caac9dee9172beaa01df316ef27d0b4a340b 100644
(file)
--- a/
include/xbt/functional.hpp
+++ b/
include/xbt/functional.hpp
@@
-208,11
+208,11
@@
private:
{
const static TaskVtable vtable {
// Call:
- [](TaskUnion& buffer, Args... args)
-> R
{
+ [](TaskUnion& buffer, Args... args) {
F* src = reinterpret_cast<F*>(&buffer);
F code = std::move(*src);
src->~F();
- code(std::forward<Args>(args)...);
+
return
code(std::forward<Args>(args)...);
},
// Destroy:
std::is_trivially_destructible<F>::value ?
@@
-237,7
+237,7
@@
private:
{
const static TaskVtable vtable {
// Call:
- [](TaskUnion& buffer, Args... args)
-> R
{
+ [](TaskUnion& buffer, Args... args) {
// Delete F when we go out of scope:
std::unique_ptr<F> code(*reinterpret_cast<F**>(&buffer));
return (*code)(std::forward<Args>(args)...);