はい、できます。C++11 の機能です。本当に等しい
struct ColorProperties {
ColorProperties()
: colorRed(true), colorBlue(false), isRectangle(true)
{}
//
};
この提案については、こちらで読むことができます
スタンダードから引用。
n3376 12.6.2/8
非委任コンストラクターで、特定の非静的データ メンバーまたは基底クラスが mem-initializer-id によって指定されていない場合 (コンストラクターに ctor-initializer がないために mem-initializer-list がない場合を含む)エンティティが抽象クラス (10.4) の仮想基底クラスではない場合、
— エンティティがブレースまたはイコール初期化子を持つ非静的データ メンバーである場合、エンティティは 8.5 で指定されているように初期化されます。
struct A {
A();
};
struct B {
B(int);
};
struct C {
C() { }
A a;
const B b; // error: B has no default constructor
int i; // OK: i has indeterminate value
int j = 5; // OK: j has the value 5
};