hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.5K
active users

Šimon Tóth

C++23 added the 𝒊𝒇 𝒄𝒐𝒏𝒔𝒕𝒆𝒗𝒂𝒍 statement, which can test whether the code is invoked from a constant-evaluated context.

This allows for functions that couldn't be constant-evaluated to provide alternate implementations.

Note that while similar, this is different than 𝒊𝒇 𝒄𝒐𝒏𝒔𝒕𝒆𝒙𝒑𝒓, for which the condition is always evaluated in a constant context.

Compiler Explorer link: compiler-explorer.com/z/j8Pbdf