Closed JonathanFoo0523 closed 1 month ago
I believe this problem occurs because C++ doesn't allow the use of a non-constant array size for list initialization of a type that doesn't have a zero-argument constructor. If we modify class a
to become:
class a {
public:
a(int) {}
a() {}
};
then the dredd-mutated program will compile.
I think checking whether a type used for list initialization has a zero-argument constructor is non-trivial, so I will avoid mutating the array size regardless of the type.
Dredd mutates the the sole statement in
main()
in the following file:to
This results in compilation error: