Commit f6648a8e authored by Ronan's avatar Ronan

fix(general): resolve types in L_RESOLVE_OVERLOAD

parent 818be26f
......@@ -20,7 +20,7 @@
#ifndef _L_ENUM_GENERATOR_H_
#define _L_ENUM_GENERATOR_H_
#include "linphone/utils/magic-macros.h"
#include "linphone/utils/general.h"
// =============================================================================
......
......@@ -24,6 +24,8 @@
#include <type_traits>
#endif
#include "linphone/utils/magic-macros.h"
// =============================================================================
#ifdef __cplusplus
......@@ -254,7 +256,7 @@ namespace Private {
};
template<typename... Args>
struct ResolveOverload : ResolveMemberFunctionOverload<Args...>, ResolveConstMemberFunctionOverload<Args...> {
struct ResolveOverload : ResolveConstMemberFunctionOverload<Args...>, ResolveMemberFunctionOverload<Args...> {
using ResolveMemberFunctionOverload<Args...>::operator();
using ResolveConstMemberFunctionOverload<Args...>::operator();
......@@ -265,8 +267,11 @@ namespace Private {
};
}
// Useful to select a specific overloaded function. (Avoid usage of static_cast.)
#define L_RESOLVE_OVERLOAD(ARGS) LinphonePrivate::Private::ResolveOverload<ARGS>
#define L_DECLTYPE(NOOP, VAR) decltype(VAR)
// Useful to select a specific overloaded function.
#define L_RESOLVE_OVERLOAD(...) \
LinphonePrivate::Private::ResolveOverload<L_APPLY(L_DECLTYPE, 0, __VA_ARGS__)>()
// -----------------------------------------------------------------------------
// Wrapper public.
......
......@@ -20,12 +20,8 @@
#ifndef _L_MAGIC_MACROS_H_
#define _L_MAGIC_MACROS_H_
#include "linphone/utils/general.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
// Concat in depth context.
#define L_CONCAT__(A, B) A ## B
#define L_CONCAT_(A, B) L_CONCAT__(A, B)
......@@ -282,6 +278,4 @@ LINPHONE_BEGIN_NAMESPACE
(MACRONAME, DATA, __VA_ARGS__) \
)
LINPHONE_END_NAMESPACE
#endif // ifndef _L_MAGIC_MACROS_H_
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