D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3484 - std.socket.Address hierarchy not const-safe
Summary: std.socket.Address hierarchy not const-safe
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-07 03:01 UTC by Justin Spahr-Summers
Modified: 2015-06-09 01:28 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Justin Spahr-Summers 2009-11-07 03:01:49 UTC
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 Vladimir Panteleev 2011-08-23 23:41:49 UTC
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 briancschott 2014-06-06 18:20:38 UTC
Looks like this was taken care of in a later pull request:

https://github.com/D-Programming-Language/phobos/pull/260