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

2016-09-28 Thread Dsciple via Digitalmars-d-learn
On Wednesday, 28 September 2016 at 16:49:54 UTC, Vladimir Panteleev wrote: On Wednesday, 28 September 2016 at 15:34:56 UTC, Dsciple wrote: I don't understand what prevents such function (in turn calling some OS-level C function) from doing its job at compile time too. Guess it's a very challang

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

2016-09-28 Thread Dsciple via Digitalmars-d-learn
On Wednesday, 28 September 2016 at 09:56:06 UTC, Marc Schütz wrote: You could solve the problem as you suggested by moving the initializations into a constructor, but if your default values are only ever IPs (i.e., no hostname resolution necessary), you could also add an additional function tha

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

2016-09-27 Thread Dsciple via Digitalmars-d-learn
On Tuesday, 27 September 2016 at 14:39:10 UTC, Dsciple wrote: On Tuesday, 27 September 2016 at 14:02:25 UTC, Marc Schütz wrote: 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

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

2016-09-27 Thread Dsciple via Digitalmars-d-learn
On Tuesday, 27 September 2016 at 14:02:25 UTC, Marc Schütz wrote: 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 b

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

2016-09-27 Thread Dsciple via Digitalmars-d-learn
Hi there! I wrote a small utility library to read configuration parameters from both command-line arguments (using std.getopt) and SDLang files (using sdlang-d package). The main library defines a struct ConfigParams whose fields are themselves structs defined in sub-libraries (set as depende