-
Notifications
You must be signed in to change notification settings - Fork 74
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
dereferenceable::operator-> uses potentially overloaded T::operator& #35
Comments
Looking at the documentation at http://www.boost.org/doc/libs/1_65_1/libs/utility/operators.htm#deref, it is documented to return |
Hi Daniel, It's a real problem reported by a user of Boost.MultiIndex —which library is BTW 13 years old :-) Basically, Boost.MultiIndex does not work with elements whose I understand changing this on your side requires that you update the documentation from Requirements: to Requirements: which is not, strictly speaking, a relaxation of the former condition — Thank you |
If Boost.MultiIndex is only 13 years old, you loose ;-P Joking aside, I am not trying to ignore the problem, I was just curious where this was coming from. I think it is likely enough that people are not relying on the current implementation to allow them to "abuse" an overloaded For the documentation part, well, it's not correct that the "return" is directly convertible to Requirements: or "...returned value..." instead of "...return..."? |
I think this not correct either... What about Requirements: "Address of a value" is a well-defined concept that does not depend on |
OK, agreed. I'll commit a fix soon. |
Thank you! Some Russian guy is going to be grateful for this, even if he is not aware of the behind-the-scenes conversation. |
Protect dereferenceable<> against overloaded operator&, fixes #35
In line 305 of
boost/operators.hpp
:This will break if
T
overloadsoperator&
. I suggest usingboost::addressof
to protect us from that.The text was updated successfully, but these errors were encountered: