Skip to content

Instantly share code, notes, and snippets.

@twof
Created January 29, 2019 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twof/fc6d74462d13a0ef09dd423819864603 to your computer and use it in GitHub Desktop.
Save twof/fc6d74462d13a0ef09dd423819864603 to your computer and use it in GitHub Desktop.
template<typename Policy, typename ...Args>
auto set_window_management_policy(Args& ... args) -> SetWindowManagementPolicy
{
return SetWindowManagementPolicy{[&args...](WindowManagerTools const& tools) -> std::unique_ptr<WindowManagementPolicy>
{ return std::make_unique<Policy>(tools, args...); }};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment