Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotBM to Hacker NewsEnglish · 11 days ago

C++26: The New Debugging Header

www.sandordargo.com

external-link
message-square
0
link
fedilink
2
external-link

C++26: The New Debugging Header

www.sandordargo.com

RSS BotBM to Hacker NewsEnglish · 11 days ago
message-square
0
link
fedilink
C++26: the new debugging header
www.sandordargo.com
external-link
If you’ve ever needed to hit a breakpoint programmatically in C++, you’ve probably written something like this: 1 2 3 4 5 6 7 8 9 #if defined(_MSC_VER) __debugbreak(); #elif defined(__clang__) __builtin_debugtrap(); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ volatile("int3"); #else raise(SIGTRAP); #endif Every major C++ project reinvents this wheel. Boost.Test has debugger_break(), Catch2 has CATCH_BREAK_INTO_DEBUGGER, Dear ImGui has IM_DEBUG_BREAK() and Unreal has UE_DEBUG_BREAK. The platform knowledge required is arcane but well-known to tooling implementers — it just wasn’t standardized. C++26 fixes this with P2546R5 and its companion P2810R4 thanks to Rene Ferdinand Rivera Morell. A new header provides…

Comments

alert-triangle
You must log in or register to comment.

Hacker News

hackernews

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !hackernews@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

Posts from the RSS Feed of HackerNews.

The feed sometimes contains ads and posts that have been removed by the mod team at HN.

Source of the RSS Bot

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 400 users / day
  • 1.85K users / week
  • 3.9K users / month
  • 8.81K users / 6 months
  • 2 local subscribers
  • 5.62K subscribers
  • 63.7K Posts
  • 34.7K Comments
  • Modlog
  • mods:
  • patrick
  • RSS BotB
  • BE: 0.19.20
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org