There is another CC problem with macros.
I have declared a macro at header let's say
testa.h:
#define SLIB_DECLARE_EXCEPTION(name, type) \ // << A there is a bug at forums C++ format plugin too :P
class name : public Exception { \
public : name (int error, const string desc, const string func, const string file, long line) \
: Exception(error, desc, func, file, line, type) {} }; \
At another file
#include "testa.h"
// MyException1 declared with normal way
class MyException1 : public Exception
{
public :
MyException1(int error, const string desc, const string func, const string file, long line)
: Exception(error, desc, func, file, line, "MyException1")
{}
};
// MyException2 Declared using my macro
SLIB_DECLARE_EXCEPTION(MyException2, "MyException2");
// <<< Here code completition sees only MyException1
Is it possible to be implemented, or it is too complicated?