Commit 8e601e98 authored by Ronan's avatar Ronan

tmp

parent 3e5095d8
......@@ -88,18 +88,18 @@
std::tuple_size< \
decltype(lMetaSignals(LinphonePrivate::Private::MetaObjectCounter<>(), static_cast<lType **>(nullptr))) \
>::value; \
friend constexpr auto lMetaSignals ( \
LinphonePrivate::Private::MetaObjectCounter<L_INTERNAL_SIGNAL_INDEX(NAME, __LINE__) + 1> counter, \
lType ** context \
) L_INTERNAL_META_RETURN( \
std::tuple_cat( \
lMetaSignals(counter.prev(), context), \
std::make_tuple(LinphonePrivate::Private::makeMetaObjectSignalInfo( \
L_CALL(L_RESOLVE_OVERLOAD, TYPES)(&lType::NAME), \
#NAME \
)) \
) \
)
friend constexpr auto lMetaSignals ( \
LinphonePrivate::Private::MetaObjectCounter<L_INTERNAL_SIGNAL_INDEX(NAME, __LINE__) + 1> counter, \
lType **context \
) L_INTERNAL_META_RETURN( \
std::tuple_cat( \
lMetaSignals(counter.prev(), context), \
std::make_tuple(LinphonePrivate::Private::makeMetaObjectSignalInfo( \
L_CALL(L_RESOLVE_OVERLOAD, TYPES)(&lType::NAME), \
#NAME \
)) \
) \
)
// =============================================================================
......
......@@ -32,7 +32,6 @@ using namespace LinphonePrivate;
#define CHECK_SIGNAL(NAME, INDEX) \
static_assert(L_INTERNAL_SIGNAL_INDEX(NAME, __LINE__) == INDEX, "Bad signal index.");
class TestObjectPrivate : public ObjectPrivate {
public:
};
......@@ -46,6 +45,14 @@ public:
L_SIGNAL(signal1, (int, float), toto, tata); CHECK_SIGNAL(signal1, 0);
L_SIGNAL(signal2, (bool, float, int), a, b, c); CHECK_SIGNAL(signal2, 1);
static void toto () {
lMetaSignals(
LinphonePrivate::Private::MetaObjectCounter<5>(),
static_cast<lType **>(nullptr)
);
}
private:
L_DECLARE_PRIVATE(TestObject);
};
......@@ -55,6 +62,7 @@ private:
static void check_object_creation () {
TestObject *object = new TestObject();
TestObject::toto();
delete object;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment