Re: Why does Unconst exist?

2021-07-27 Thread Ali Çehreli via Digitalmars-d-learn
On 7/27/21 10:38 PM, Tejas wrote: When I initially saw it, I was hopeful that it would allow me to bypass some of the restrictions of ```const``` , but it literally just takes a type and strips the ```const``` from it, you can't pass a variable to it in order to get rid of ```const``` . What

Why does Unconst exist?

2021-07-27 Thread Tejas via Digitalmars-d-learn
When I initially saw it, I was hopeful that it would allow me to bypass some of the restrictions of ```const``` , but it literally just takes a type and strips the ```const``` from it, you can't pass a variable to it in order to get rid of ```const``` . What use does it serve then?

Re: Performance issue with fiber

2021-07-27 Thread Denis Feklushkin via Digitalmars-d-learn
On Monday, 26 July 2021 at 12:09:07 UTC, hanabi1224 wrote: Thank you for your response! I've got some questions tho. On Saturday, 24 July 2021 at 09:17:47 UTC, Stefan Koch wrote: It will not use a fiber pool. Why fiber pool? Isn't fiber a lightweight logical thread which is already

Re: POST request with std.net.curl

2021-07-27 Thread bachmeier via Digitalmars-d-learn
On Monday, 26 July 2021 at 19:53:05 UTC, frame wrote: All better the lib could do is to print the text for the status too and the raw payload sent by the server aka error description, if any. That's what I'm proposing. Currently std.net.curl's post function doesn't report all the

Re: Is there a "nice" way to access the names of template parameters outside?

2021-07-27 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 27 July 2021 at 10:15:51 UTC, Lukas Borin wrote: On Tuesday, 27 July 2021 at 09:31:07 UTC, Paul Backus wrote: On Tuesday, 27 July 2021 at 08:15:12 UTC, Lukas Borin wrote: Consider the following template ```D auto foo(T, int W, int H)(T p1, T p2) { } ``` Is there a "nice" way

Re: Is there a "nice" way to access the names of template parameters outside?

2021-07-27 Thread Lukas Borin via Digitalmars-d-learn
On Tuesday, 27 July 2021 at 09:31:07 UTC, Paul Backus wrote: On Tuesday, 27 July 2021 at 08:15:12 UTC, Lukas Borin wrote: Consider the following template ```D auto foo(T, int W, int H)(T p1, T p2) { } ``` Is there a "nice" way from the outside the get the names of the template values? As

Re: Is there a "nice" way to access the names of template parameters outside?

2021-07-27 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 27 July 2021 at 08:15:12 UTC, Lukas Borin wrote: Consider the following template ```D auto foo(T, int W, int H)(T p1, T p2) { } ``` Is there a "nice" way from the outside the get the names of the template values? As far as I'm aware there is no way to introspect on template

Is there a "nice" way to access the names of template parameters outside?

2021-07-27 Thread Lukas Borin via Digitalmars-d-learn
Consider the following template ```D auto foo(T, int W, int H)(T p1, T p2) { } ``` Is there a "nice" way from the outside the get the names of the template values? E.g: ```D pragma(msg, TemplateParameterNames!(foo)); // AliasSeq!("T", "W", "H") or ["T", "W", "H"] ``` I know you can find