TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

C++26: more constexpr in the standard library

86 点作者 npalli10 天前

7 条评论

WalterBright10 天前
D does compile time function evaluation every time there&#x27;s a <i>ConstExpression</i> in the grammar. It did this back in 2007. It required no changes to the grammar or syntax, it just enhanced constant folding to be able to do function calls.<p>I don&#x27;t understand why it is so complex in C++.
评论 #43865232 未加载
评论 #43867746 未加载
评论 #43866365 未加载
评论 #43870405 未加载
评论 #43865167 未加载
WalterGR10 天前
8 days ago, 90+ comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43775670">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43775670</a>
评论 #43873530 未加载
nokeya10 天前
And in the wild (supported by all major compilers) we will see this somewhere around 2040…
评论 #43870505 未加载
评论 #43863227 未加载
gitroom10 天前
love seeing all the constant updates but sometimes i feel like the biggest pain points just stick around way too long - you ever feel like these standards chase the wrong problems sometimes?
评论 #43866183 未加载
kubav02710 天前
One of my first tasks in my carrier was implementing stable sort to incomplete stl implementation. In 3 years no one used it. This so niche it should not be part of C++ standard.
brooke2k10 天前
seeing the words &quot;constexpr sorting&quot; makes all the compile-time sirens go off in my head
评论 #43864448 未加载
dvratil10 天前
Amazing, now could I just get a way to do asynchronous network requests in two lines of code, like I have with other languages?<p>Honestly, it seems to me like the committee is constantly chasing the easy bits but is failing to address the bigger issues in the language and, more importantly, the standard library.
评论 #43871962 未加载
评论 #43869397 未加载
评论 #43867742 未加载
评论 #43872364 未加载