Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommonReference<const T&, const U&> is wrong everywhere #335

Closed
ericniebler opened this issue Feb 18, 2017 · 1 comment
Closed

CommonReference<const T&, const U&> is wrong everywhere #335

ericniebler opened this issue Feb 18, 2017 · 1 comment

Comments

@ericniebler
Copy link
Owner

ericniebler commented Feb 18, 2017

It should be CommonReference<const remove_reference_t<T>&, const remove_reference_t<U>&>.

Discussion: The purpose of this check is to verify that there is some reason to believe that T and U are merely different representations of the same set of values. This is adequately accomplished by testing the common-reference-ness of const lvalues of T's and U's underlying types. It makes no sense to drop the const by trying to apply it to a reference.

@ericniebler
Copy link
Owner Author

Fixes proposed in P0547R1 and #155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant