X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fimpl%2Fmembind.hh;h=5146e4c4e0680c5a61634871e467a1ba6cdc1b0a;hb=7f60122e00a4680d39b199a738160eb8a5dea381;hp=fcf3eaf13001149721d6935a7f33e596fc48d3a8;hpb=a1a6c76a214ad1935032826713cabaf9ac57bf07;p=senf.git diff --git a/Utils/impl/membind.hh b/Utils/impl/membind.hh index fcf3eaf..5146e4c 100644 --- a/Utils/impl/membind.hh +++ b/Utils/impl/membind.hh @@ -27,7 +27,6 @@ #include #include #include -#include "../../config.hh" template boost::function membind(R (T::* fn)(),scOBTYPE ob) @@ -35,6 +34,12 @@ boost::function membind(R (T::* fn)(),scOBTYPE ob) return boost::bind(fn,ob); } +template +boost::function membind(R (T::* fn)() const,scOBTYPE ob) +{ + return boost::bind(fn,ob); +} + // for BOOST_PP_ITERATION() in 2..9 do #define BOOST_PP_ITERATION_PARAMS_1 (4, (2, 9, SENF_ABSOLUTE_INCLUDE_PATH(Utils/impl/membind.hh), 1)) #include BOOST_PP_ITERATE() @@ -51,6 +56,13 @@ membind(R (T::* fn)( scPARAMS(A) ), scOBTYPE ob) return boost::bind(fn, ob, scPARAMS(_) ); } +template < typename R, typename T, scPARAMS(typename A) > +boost::function +membind(R (T::* fn)( scPARAMS(A) ) const, scOBTYPE ob) +{ + return boost::bind(fn, ob, scPARAMS(_) ); +} + #undef scPARAMS #undef scARG