Problem parsing IPv4/IPv6 addresses with std.socket.parseAddress

Marc Schütz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 27 07:02:25 PDT 2016


On Tuesday, 27 September 2016 at 09:04:53 UTC, Dsciple wrote:
> As said, this works fine when tested in isolation, and the 
> compiler only complains when using BindAddress as a member of 
> ConfigParams.
> Any idea what the problem may be?
> Or is there maybe a ready to use, high-level library for 
> parsing parameters from command-line arguments and config files 
> of some kind?

I assume your ConfigParams variable is global or static? Can you 
show how you initialize it, and how it's declared?

You're probably using it in a way that requires it to be 
evaluated at compile time. That's the case for initializers of 
global/static variables, as well as default values of struct 
members.


More information about the Digitalmars-d-learn mailing list