6

[C++20][safety] static_assert is all you need (no leaks, no UB)

 1 year ago
source link: https://twitter.com/krisjusiak/status/1645360641538945025
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Don’t miss what’s happening
People on Twitter are the first to know.

Tweet

See new Tweets

Conversation

Replying to
Dumb question: is that all constexpr evaluation, and if so, how does that end up being all you need? I guess you're saying if you write everything as constexpr?
Replying to
yeah, if everything is written as constexpr then it can be tested at compile-time which checks for memory leaks , UB and since constexpr can be executed at run-time the implementation works for both run-time and compile-time
Show replies
Show additional replies, including those that may contain offensive content

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK