Crony's Dungeon
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
CodyIT@programming.dev to C++@programming.devEnglish · 3 months ago

C++26: A User-Friendly assert() macro

www.sandordargo.com

external-link
message-square
1
link
fedilink
4
external-link

C++26: A User-Friendly assert() macro

www.sandordargo.com

CodyIT@programming.dev to C++@programming.devEnglish · 3 months ago
message-square
1
link
fedilink
C++26 is bringing some long-overdue changes to assert(). But why are those changes needed? And when do we actually use assert, anyway? At its core, assert() exists to validate runtime conditions. If the given expression evaluates to false, the program aborts. I’m almost certain you’ve used it before — at work, in personal projects, or at the very least in examples and code snippets. So what’s the problem? The macro nobody treats like a macro assert() is a macro — and a slightly sneaky one at that. Its name is written in lowercase, so it doesn’t follow the usual SCREAMING_SNAKE_CASE…
alert-triangle
You must log in or # to comment.
  • Oka@sopuli.xyz
    link
    fedilink
    arrow-up
    3
    ·
    3 months ago

    This reads like a GPT response

C++@programming.dev

cpp@programming.dev

Subscribe from Remote Instance

Create a post
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: !cpp@programming.dev

The center for all discussion and news regarding C++.

Rules

  • Respect instance rules.
  • Don’t be a jerk.
  • Please keep all posts related to C++.
Visibility: Public
globe

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

  • 1 user / day
  • 8 users / week
  • 149 users / month
  • 192 users / 6 months
  • 1 local subscriber
  • 2.31K subscribers
  • 323 Posts
  • 371 Comments
  • Modlog
  • mods:
  • lysdexic@programming.dev
  • Nihili0@programming.dev
  • BE: 0.19.13
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org