How can one value-initialize aggregate types in C++14 with the list-intialization syntax?
Aggregate_t {};
This is seen as aggregate initialization, which produces errors or warnings for uninitialized members of Aggregate_t.
Is this possible at all?
EDIT: examples
struct Aggregate_t {
int x;
};
int main (int, char**)
{
Aggregate_t {};
return 0;
}
Compiling with g++-4.9.2:
main.c++: In function ‘int main(int, char**)’:
main.c++:7:16: warning: missing initializer for member ‘Aggregate_t::x’ [-Wmissing-field-initializers]
Aggregate_t {};
^
Aggregate_tso we can check it really is an aggregate.{}does initialize that member.