Hacker GitHub

← All repos

sharkdp/dbg-macro

View on GitHub ↗ ★ 3,235 C++

A dbg(…) macro for C++

6 mentions on Hacker News by 4 people: 2 stories, 4 comments · first 2019-09-21 · latest 2023-09-30

Mentions per year 6 mentions · busiest year 2019 (4)
20082026
  1. ▲ 2
    Dbg() – A macro for printf-style debugging fans
    story by jandeboevrie · 2023-09-30 · 0 comments
  2. …of the critical comments here are missing that that's probably the intended use-case of this. [1] https://github.com/sharkdp/dbg-macro
  3. Thank you for the feedback. No, it does not evaluate its argument twice - see this test: https://github.com/sharkdp/dbg-macro/blob/f30cdda9fc5332e062...
    comment by sharkdp · 2019-09-21 · in Show HN: A dbg(...) macro for C++
  4. Thank you for the feedback. We deliberately chose not to do this (see discussion in https://github.com/sharkdp/dbg-macro/issues/26 ), mainly for the reasons given in the Rust documentation: > The dbg! macro works exactly the same in…
    comment by sharkdp · 2019-09-21 · in Show HN: A dbg(...) macro for C++
  5. …offer runtime enable/disable. Out of curiosity, I wrote a little benchmark and submitted as a PR: https://github.com/sharkdp/dbg-macro/pull/57 The key idea is that modern CPUs dynamically branch-predict-away if-statements that are…
    comment by asah · 2019-09-21 · in Show HN: A dbg(...) macro for C++
  6. ▲ 162
    Show HN: A dbg(...) macro for C++
    story by sharkdp · 2019-09-21 · 51 comments