Skip to content

Instantly share code, notes, and snippets.

@msimberg
Last active December 7, 2020 13:49
Show Gist options
  • Save msimberg/00c033a0a7dce30fa78d1175cb8e5250 to your computer and use it in GitHub Desktop.
Save msimberg/00c033a0a7dce30fa78d1175cb8e5250 to your computer and use it in GitHub Desktop.
unwrapping noncopyable
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