3 ms·
> True. The usual solution is to force-instantiate them against archetype classes. This is correct, but you not only need to make sure that they accept an arch
by fluffything 6y ago
> True. The usual solution is to force-instantiate them against archetype classes.
This is correct, but you not only need to make sure that they accept an archetype class, you also need to make sure that they reject all others.
This often requires writing and instantiating a substantial amount of code for testing purposes, which often ends up as large or larger than the actual logic itself.
I suppose you already know the pain of doing this, but for those who do not, it is like testing a function in python for all possible inputs. Can be done, but is a lot of work.
In practice, most generic C++ code is not tested in this way due to how painful it is to do so.
So what in Rust takes no work, takes a huge amount of effort in C++.