Bug 3484 – std.socket.Address hierarchy not const-safe

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-11-07T03:01:00Z
Last change time
2015-06-09T01:28:30Z
Assigned to
nobody
Creator
Justin.SpahrSummers

Comments

Comment #0 by Justin.SpahrSummers — 2009-11-07T03:01:49Z
The methods of the std.socket.Address and std.socket.InternetAddress classes are not qualified const; thus, when trying to use const-safe structures containing addresses, a lot of casts are required. This problem is exacerbated by the fact that addresses aren't value types (structs).
Comment #1 by dlang-bugzilla — 2011-08-23T23:41:49Z
https://github.com/D-Programming-Language/phobos/pull/211 Note that Address.name() can't be const, since it can be used (and is used, within std.socket) to populate the Address data.
Comment #2 by briancschott — 2014-06-06T18:20:38Z
Looks like this was taken care of in a later pull request: https://github.com/D-Programming-Language/phobos/pull/260