最简单的方法是不为成员类型提供无参数的构造函数:
struct B
{
    B(int x) {}
};
struct A
{
    B a;
    B b;
    B c;
};
int main() {
        // A a1{ 1, 2 }; // will not compile 
        A a1{ 1, 2, 3 }; // will compile 
另一种选择:如果您的成员是const&,则必须初始化所有成员:
struct A {    const int& x;    const int& y;    const int& z; };
int main() {
//A a1{ 1,2 };  // will not compile 
A a2{ 1,2, 3 }; // compiles OK
如果您可以与一个虚拟const&成员一起生活,则可以将其与@ max66的定点概念结合起来。
struct end_of_init_list {};
struct A {
    int x;
    int y;
    int z;
    const end_of_init_list& dummy;
};
    int main() {
    //A a1{ 1,2 };  // will not compile
    //A a2{ 1,2, 3 }; // will not compile
    A a3{ 1,2, 3,end_of_init_list() }; // will compile
来自cppreference https://en.cppreference.com/w/cpp/language/aggregate_initialization
  如果初始化程序子句的数量少于成员数量,或者初始化程序列表完全为空,则其余成员将被值初始化。如果引用类型的成员是这些其余成员之一,则程序格式错误。
另一种选择是采用max66的哨兵概念,并添加一些语法糖以提高可读性 
struct init_list_guard
{
    struct ender {
    } static const end;
    init_list_guard() = delete;
    init_list_guard(ender e){ }
};
struct A
{
    char a;
    char b;
    char c;
    init_list_guard guard;
};
int main() {
   // A a1{ 1, 2 }; // will not compile 
   // A a2{ 1, init_list_guard::end }; // will not compile 
   A a3{ 1,2,3,init_list_guard::end }; // compiles OK