#define object object() // object -> object()
#define none object // none -> object -> object()
#define lambda (std::function<****>)[]() // HOW?!, lambda -> (std::function<object(object, const char*)>)[]()
The problem:
#define object object() // object -> object()
changes object
to object()
.
What i want is to make :
lambda
-> (std::function<object(object, const char*)>)[]()
.
But due to my previous macros object
turns to object()
.So i have :
(std::function<object()(object(), const char*)>)[]()
Is there a smarter way of doing this, maybe using #ifdef
or something? I never used preprocessor macros before, so maybe am doing everything wrong. It seems it doesn't matter which one I #define
first.
ANSWER::
I changed the class name from object
to Object
#define object Object() // object -> Object()
#define none object // none -> object -> Object()
#define lambda (std::function<Object(Object, const char*)>)[]()
// now pre possessor has nothing to change and everything works fine