[stmt.expand] Fix example 2#9027
Conversation
I think it does make sense, because it also requires |
|
To be fair, it's surprising that we would find it surprising that What's next? constexpr int x = 10;
// just in case you didn't believe that 'x' is a constant expression:
constexpr int y = sizeof(char[x]);I get that it's inside |
|
|
|
Yeah, I think I just wanted to do something that you couldn't do in a vanilla |
|
On the other hand, does this need changing? What's wrong with the example as is? |
A part of the example is exotic and surprising, and distracts from what the example is actually about. In the same fashion, writing |
|
To be fair, I can see how we might want something that demonstrates that you can use constant expressions in loops with this feature, but making some contrived and unnecessary use inside Maybe something with |
sizeof(char[s])does not make sense, addingstoresultdirectly would pass the assertion.