This implement the C++23 paper P2647R1 (adopted in Kona)
Details
Details
- Reviewers
erichkeane - Group Reviewers
Restricted Project - Commits
- rG5607fc002dd4: [Clang] Permit static constexpr variables in constexpr functions
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Can you add some tests that do meaningful things with the static variable? Particularly during constexpr evaluation time?
clang/test/SemaCXX/constant-expression-cxx2b.cpp | ||
---|---|---|
246 | Can we also add the test from the proposal as well for completeness sake: constexpr char test() { static const int x = 5; static constexpr char c[] = "Hello World"; return *(c+x); } static_assert(' ' == test()); |
Can we also add the test from the proposal as well for completeness sake: