Здравствуйте, alexei_, Вы писали:
A>Да, именно compile-time (как у Александреску),
A>только чтобы он вызывал не ошибку компиляции а warning
Может так подойдет?
///////////////////////// Pragma message helper macro /////////////////////////
/*
When the compiler sees a line like this:
#pragma chMSG(Fix this later)
it outputs a line like this:
c:\CD\CmnHdr.h(82):Fix this later
You can easily jump directly to this line and examine the surrounding code.
*/
#define chSTR2(x) #x
#define chSTR(x) chSTR2(x)
#define chMSG(desc) message(__FILE__ "(" chSTR(__LINE__) "):" #desc)
Не warning, конечно... а нужен имеено warning? Для чего?