https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #11 from Glen Joseph Fernandes ---
> if it can never be used.
You're misunderstanding. to_address(p) requires that pointer_traits is
valid. It just doesn't need to have a to_address member function.
Example 1. You have a pointer-l
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #10 from Giuseppe D'Angelo ---
(By the way, finding this bug is quite hard. Could "address_of" be changed to
"to_address" , in the bug description? I think that's the intended meaning.
And, "to_pointer", mentioned a few times, doesn't
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
Giuseppe D'Angelo changed:
What|Removed |Added
CC||dangelog at gmail dot com
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #8 from Jonathan Wakely ---
I suppose I could change the static_assert message to also suggest defining
your own specialization of std::pointer_traits, which is another way to make it
work.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
Jonathan Wakely changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
Glen Joseph Fernandes changed:
What|Removed |Added
CC||glenjofe at gmail dot com
--- Co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
Jonathan Wakely changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|redi at gcc dot
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #5 from Jonathan Wakely ---
But on third thoughts, I don't know how to implement this reliably.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
Jonathan Wakely changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #3 from Jonathan Wakely ---
Ugh, yes, I think we do.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #2 from Zach Laine ---
Fair enough. [pointer.conversion] says that to_pointer(const Ptr& p) is
"pointer_traits::to_address(p) if that expression is well-formed (see
[pointer.traits.optmem]), otherwise to_address(p.operator->())"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #1 from Jonathan Wakely ---
I think this is the "correct" behaviour.
The specification of pointer_traits::element_type says that if
Ptr::element_type isn't valid, and Ptr isn't a template that can be "rebound",
then "otherwise, the s
12 matches
Mail list logo