Last active
December 7, 2020 13:49
-
-
Save msimberg/00c033a0a7dce30fa78d1175cb8e5250 to your computer and use it in GitHub Desktop.
unwrapping noncopyable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct noncopyable { | |
noncopyable(noncopyable const&) = delete; | |
} | |
... | |
{ | |
auto f = [](noncopyable const&) {}; | |
auto uf = hpx::util::unwrapping(f); | |
noncopyable n; | |
//uf(n); // Not ok | |
uf(noncopyable{}); // Ok | |
uf(std::move(n)); // Ok | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment