[Bug libstdc++/71771] DR 685 applied incorrectly
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 6 10:16:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71771
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This fails without the single-type overloads:
#include <iterator>
namespace greedy {
struct X { };
template<typename T> X operator-(T, T) { return {}; }
}
int main()
{
std::move_iterator<greedy::X*> m{nullptr};
m - m;
std::reverse_iterator<greedy::X*> r{nullptr};
r - r;
}
Whether we still care about such unconstrained templates is another matter.
More information about the Gcc-bugs
mailing list