summaryrefslogtreecommitdiffstats
path: root/base/bind.h.pump
diff options
context:
space:
mode:
Diffstat (limited to 'base/bind.h.pump')
-rw-r--r--base/bind.h.pump17
1 files changed, 10 insertions, 7 deletions
diff --git a/base/bind.h.pump b/base/bind.h.pump
index 9d4c5ee..494d716 100644
--- a/base/bind.h.pump
+++ b/base/bind.h.pump
@@ -71,11 +71,12 @@ $range ARG 1..ARITY
template <typename Functor[[]]
$if ARITY > 0 [[, ]] $for ARG , [[typename P$(ARG)]]>
-internal::BindStateHolder<
- internal::BindState<
+base::Callback<
+ typename internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
- void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])> >
+ void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])>
+ ::UnboundRunType>
Bind(Functor functor
$if ARITY > 0 [[, ]] $for ARG , [[const P$(ARG)& p$(ARG)]]) {
// Typedefs for how to store and run the functor.
@@ -125,11 +126,13 @@ $if ARG == 1 [[
]] $$ $for ARG
+ typedef internal::BindState<RunnableType, RunType, [[]]
+void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])> [[]]
+BindState;
- return internal::MakeBindStateHolder(
- new internal::BindState<RunnableType, RunType, [[]]
-void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])>(
- internal::MakeRunnable(functor)[[]]
+
+ return Callback<typename BindState::UnboundRunType>(
+ new BindState(internal::MakeRunnable(functor)[[]]
$if ARITY > 0 [[, ]] $for ARG , [[p$(ARG)]]));
}