Skip to content

Commit

Permalink
Merge branch 'dev/fix_object_method_pair'
Browse files Browse the repository at this point in the history
  • Loading branch information
2bbb committed Jan 1, 2020
2 parents d408d14 + 4ca4215 commit 2bae7ca
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/details/ofxPubSubOscTypeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,17 @@ namespace ofx {
: public std::true_type {};

template <typename obj, typename res, typename ... args>
struct is_bindable<obj, res(obj::*)(args ...)>
struct is_bindable<obj &, res(obj::*)(args ...)>
: public std::true_type {};

template <typename obj, typename res, typename ... args>
struct is_bindable<obj, res(obj::*)(args ...) const>
struct is_bindable<obj &, res(obj::*)(args ...) const>
: public std::true_type {};

template <typename obj, typename res, typename ... args>
struct is_bindable<const obj, res(obj::*)(args ...) const>
struct is_bindable<const obj &, res(obj::*)(args ...) const>
: public std::true_type {};

template <typename meth>
struct get_arg_num;

Expand All @@ -220,67 +220,67 @@ namespace ofx {
template <typename obj, typename meth>
struct binder<obj, meth, 0> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o); }
static type bind(obj o, meth m) { return std::bind(m, o); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 1> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 2> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 3> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 4> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 5> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 6> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 7> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 8> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 9> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8), P(9)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8), P(9)); }
};

template <typename obj, typename meth>
struct binder<obj, meth, 10> {
using type = typename function_traits<meth>::function_type;
type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8), P(9), P(10)); }
static type bind(obj o, meth m) { return std::bind(m, o, P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8), P(9), P(10)); }
};

template <typename obj, typename meth>
Expand Down

0 comments on commit 2bae7ca

Please sign in to comment.