mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-05 16:10:31 +02:00
Simplify wording of constexpr/const relation
Co-authored-by: Martin Geisler <mgeisler@google.com>
This commit is contained in:
parent
89ddb2c197
commit
a532c23c60
@ -53,7 +53,7 @@ Sometimes you want a global constant that isn't constructable at compile time, s
|
||||
|
||||
<details>
|
||||
|
||||
* If the target audience is well versed in C++, it might be helpful to mention that `const` behaves semantically similar to C++'s `constexpr`
|
||||
* Mention that `const` behaves semantically similar to C++'s `constexpr`.
|
||||
* `static`, on the other hand, is much more similar to a `const` or mutable global variable.
|
||||
* It isn't super common that one would need a runtime evaluated constant, but it is helpful and safer than using a static.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user