[Bug libstdc++/71771] DR 685 applied incorrectly

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 6 23:21:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71771

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Casey Carter from comment #5)
> If you think that defending against unconstrained templates is important,
> then we should open a library issue to standardize that behavior. From my
> experience with range-v3, fighting unconstrained templates seems to
> generally be a losing battle; I think we'd be better off simply forbidding
> them than trying to specify our way around them.

Yes, I completely agree.

I'm thinking of leaving unconstrained single-type overloads defined for C++03
mode, to defend against greedy unconstrained operators in old code.

But for C++11 and later, when template authors have the tools to easily
constrain their function templates, I think we should remove the single-type
overloads and just have the constrained ones required by DR 685.


More information about the Gcc-bugs mailing list