added impelementation-candidate for magic type-erasure nested class

This commit is contained in:
Kjistóf 2016-11-27 14:02:28 +01:00
parent 16c4822371
commit fe574be197
1 changed files with 11 additions and 0 deletions

View File

@ -11,5 +11,16 @@ private:
public:
virtual Ret call(Args...) = 0;
};
template <typename Fun>
class callable : public callable_base
{
private:
Fun _f;
public:
callable(Fun f):_f(f) {}
virtual Ret call(Args... args)
{ return _f(std::forward<Args>(args)...); }
};
public:
};