
Arkadiy Vertleyb <vertleyb <at> hotmail.com> writes:
Is a compile-time variables concept known? It would be a set of macros
would allow assigning and changing a number assigned to a variable's name. Such variable would be considered as a constant from template argument's
"Goran Mitrovic" <gmit <at> inet.hr> wrote that perspective,
for example. Is it possible that you mean something like implemented by BOOST_PP_ASSIGN_SLOT?
No; AFAIK, you cannot update BOOST_PP_ASSIGN_SLOT from another macro (because it requires an #include directive), while __LINE__ gives you a possibility of a non-unique ID. I think I've came to a solution, but, still have to prove to myself it's good since it was done in only about 4 hours, including coming up to an idea, I cannot believe, being so simple, noone else figured it out yet (therefore I've asked that, because I have no interest in publishing something that exists any more :) ) and, finally, in more than 4 hours I was unable to merge it in your complicate typeof implementation (compilation gets very, very slow (cl.exe took more than 0.5Gb of RAM until I've removed spirit registration, for example))... :)