Skip to content

Instantly share code, notes, and snippets.

@njlr
Created September 19, 2017 11:36
Show Gist options
  • Save njlr/54c48232124064ec40598b3075599b5e to your computer and use it in GitHub Desktop.
Save njlr/54c48232124064ec40598b3075599b5e to your computer and use it in GitHub Desktop.
template<class ReturnType, class...Xs>
class Function<ReturnType(Xs...)> {
 std::shared_ptr<Concept<ReturnType,Xs...>> pimpl;
public:
  Function() {}
template<class F>
  Function(F const& f)
  : pimpl(new SFModel<F, ReturnType, Xs...> ) // heap allocation
  {}
 
 ~Function() = default;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment