Brace (aggregate) initialization for structs with default values

Here is some documentation relevant to the problem:

http://en.cppreference.com/w/cpp/language/aggregate_initialization

In c++11 your code is invalid. In c++14 it is valid again.

In C++11 adding a default initialization prevents braced init from being valid. In C++14, it does not.

A way to solve your problem in C++11 would be to write a constructor with the value for a and the b value with a default.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)