Здравствуйте, Колян, Вы писали:
К>Здравствуйте, 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)
К>
Да, это прекрасно работает в MSVC, а вот в C++Builder почему то не получается
"easily jump directly to this line and examine the surrounding code."... то есть сообщение нормальное выдается, только вот по клику нельзя перейти к строке где это написано...