mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
fixed with to compile with GCC
git-svn-id: svn://ultimatepp.org/upp/trunk@8876 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d8b9354d1b
commit
baa0a85e88
3 changed files with 9 additions and 2 deletions
|
|
@ -64,8 +64,11 @@ inline Callback Proxy(Callback& cb)
|
|||
|
||||
Callback callback(Callback cb1, Callback cb2);
|
||||
Callback& operator<<(Callback& a, Callback b);
|
||||
|
||||
#ifdef CPP_11
|
||||
inline
|
||||
Callback& operator<<(Callback& a, std::function<void ()> fn) { return a << Callback(lambda(fn)); };
|
||||
#endif
|
||||
|
||||
//0 args to Callback1
|
||||
|
||||
|
|
@ -151,11 +154,13 @@ Callback1<P1>& operator<<(Callback1<P1>& a, Callback1<P1> b)
|
|||
return a;
|
||||
}
|
||||
|
||||
#ifdef CPP_11
|
||||
template <class P1>
|
||||
Callback1<P1>& operator<<(Callback1<P1>& a, std::function<void (P1)> b)
|
||||
{
|
||||
return a << Callback(lambda(b));
|
||||
}
|
||||
#endif
|
||||
|
||||
//0 args to Callback2
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ public:
|
|||
VectorMap() {}
|
||||
|
||||
#ifdef CPP_11
|
||||
VectorMap(std::initializer_list<std::pair<K, T>> init) : AMap(init) {}
|
||||
VectorMap(std::initializer_list<std::pair<K, T>> init) : B::AMap(init) {}
|
||||
#endif
|
||||
|
||||
friend void Swap(VectorMap& a, VectorMap& b) { a.B::Swap(b); }
|
||||
|
|
@ -195,7 +195,7 @@ public:
|
|||
ArrayMap() {}
|
||||
|
||||
#ifdef CPP_11
|
||||
ArrayMap(std::initializer_list<std::pair<K, T>> init) : AMap(init) {}
|
||||
ArrayMap(std::initializer_list<std::pair<K, T>> init) : B::AMap(init) {}
|
||||
#endif
|
||||
|
||||
friend void Swap(ArrayMap& a, ArrayMap& b) { a.B::Swap(b); }
|
||||
|
|
|
|||
|
|
@ -1137,7 +1137,9 @@ public:
|
|||
Callback operator<<=(Callback action) { WhenAction = action; return action; }
|
||||
|
||||
Callback& operator<<(Callback action) { return WhenAction << action; }
|
||||
#ifdef CPP_11
|
||||
Callback& operator<<(std::function<void ()> action) { return WhenAction << action; }
|
||||
#endif
|
||||
|
||||
void SetTimeCallback(int delay_ms, Callback cb, int id = 0);
|
||||
void KillTimeCallback(int id = 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue