Fix Build-Depends in debian/control
[senf.git] / Utils / impl / membind.hh
index 7dc1930..5146e4c 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+//     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/repetition/enum_shifted.hpp>
 #include <boost/preprocessor/iteration/iterate.hpp>
-#include "../../config.h"
 
 template <typename R, typename T>
 boost::function<R()> membind(R (T::* fn)(),scOBTYPE ob)
@@ -35,6 +34,12 @@ boost::function<R()> membind(R (T::* fn)(),scOBTYPE ob)
     return boost::bind(fn,ob);
 }
 
+template <typename R, typename T>
+boost::function<R()> 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<R ( scPARAMS(A) )>
+membind(R (T::* fn)( scPARAMS(A) ) const, scOBTYPE ob)
+{
+    return boost::bind(fn, ob, scPARAMS(_) );
+}
+
 #undef scPARAMS
 #undef scARG