Core: CoWork C++11 support

git-svn-id: svn://ultimatepp.org/upp/trunk@8946 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-09-17 12:11:27 +00:00
parent aad979e438
commit f5e2736b9a

View file

@ -33,12 +33,12 @@ class CoWork : NoCopy {
public:
void Do(Callback cb);
#ifdef CPP_11
void Do(std::function<void ()> lambda) { Do(Callback(lambda(fn))); }
void Do(std::function<void ()> fn) { Do(Callback(lambda(fn))); }
#endif
CoWork& operator&(Callback cb) { Do(cb); return *this; }
#ifdef CPP_11
CoWork& operator&(std::function<void ()> lambda) { Do(Callback(lambda(fn))); return *this; }
CoWork& operator&(std::function<void ()> fn) { Do(Callback(lambda(fn))); return *this; }
#endif
void Finish();