• [^] # Re: Clay

    Posté par . En réponse au journal Clay Style Sheet. Évalué à 2.

    C'est C++20, pas C++>11 (un alias pour C++14 ?). Mais, oui, on peut en omettre. Si ça ne marche pas c'est probablement qu'il manque des constructeurs par défaut.

    https://en.cppreference.com/w/cpp/language/aggregate_initialization.html#Designated_initializers

    For a non-union aggregate, elements for which a designated initializer is not provided are initialized the same as described above for when the number of initializer clauses is less than the number of members (default member initializers where provided, empty list-initialization otherwise):