This is inspired by this post where non-trivial designated initializers are not supported.
I've already read this post and some answers claim this feature is already supported.
However, using C++17 and this code:
struct s {
int a[2];
s (int b): a{[1]=b} {} // error
};
s foo(1);
I still get the error:
sorry, unimplemented: non-trivial designated initializers not supported
s (int b): a{[1]=b} {}
I was thinking this feature is really helpful.
So my questions:
Is there a plan to support this for future C++ versions (post C++17)?
- If not, what is the biggest hindrance why it's not going to be supported
- If yes, what is the problem with the current C++ version why it takes too long for this to be supported
COMPILER
GNU C++17 - Check wandbox