You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcc 9.3 fails to compile it, saying "error: request for member ‘operator++’ is ambiguous".
I thought I would try fixing it myself but so far I haven't been able to figure out why it doesn't work, let alone how to fix it. This problem also affects any type that uses Arithmetic, which is how I originally discovered it.
The text was updated successfully, but these errors were encountered:
I don't think that the hot-fix (using the operators) will work in general for NamedType, since it would have to know if it is pre- and postincrementable. But adding the following lines to struct Arithmetic fixes it for arithmetic types at least:
using PostIncrementable<T>::operator++;
using PreIncrementable<T>::operator++;
using PostDecrementable<T>::operator--;
using PreDecrementable<T>::operator--;
I added the following test case to tests.cpp, which is just a trivial combination of the contents of the PreIncrementable and PostIncrementable tests:
gcc 9.3 fails to compile it, saying "error: request for member ‘operator++’ is ambiguous".
I thought I would try fixing it myself but so far I haven't been able to figure out why it doesn't work, let alone how to fix it. This problem also affects any type that uses Arithmetic, which is how I originally discovered it.
The text was updated successfully, but these errors were encountered: