Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,773 of 33,346    |
|    DeMarcus to All    |
|    Re: Wouldn't it be good to refactor __LI    |
|    30 Dec 12 14:29:46    |
      From: use_my_alias_here_at_hotmail_com@tellus.orb.dotsrc.org              >> In the preprocessor everything fits better. It's plain textual       >> substitution and all filenames and line numbers are known from       >> #including the files.       >>       >       > You have a point, maybe we should investigate some kind a compile       > time std::trace_point instead that doesn't mention anything about       > line or file but later could be reverse engineered to provide such       > information.       >       > When I think of it, a system's administrator has no use of line and       > file anyway, so it would be better with a big hash value in the       > log. Then this hash value could together with the right version of       > the source code provide the line and file, and maybe even the whole       > stack trace.       >       > It's a wild vision but it shouldn't be impossible.       >              I investigated stack tracing a bit further. It's actually simpler than       I thought, so I guess I will stop using __LINE__ completely since the       whole stack is more valuable.              Here's an example for Linux using backtrace:              Don't forget to include debug information with -g if using gcc.              #include |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca