[llvm] SmallVector: add missing constexpr annotations (NFC) (PR #98296)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 08:11:23 PDT 2024
nikic wrote:
> I've gone through https://en.cppreference.com/w/cpp/language/constexpr, and there doesn't seem to be a relationship between constexpr functions and constexpr constructors, but maybe I'm missing something?
How would you ever call a non-static constexpr member in a constexpr context if you cannot obtain an object of the class in a constexpr context, because the constructor is not constexpr?
These things are nominally independent, but non-static constexpr members are useless without constexpr ctors.
https://github.com/llvm/llvm-project/pull/98296
More information about the llvm-commits
mailing list