On Friday, 19 August 2022 at 13:47:41 UTC, Paul Backus wrote:
On Friday, 19 August 2022 at 10:22:25 UTC, bauss wrote:
Is there a reason why .stringof is implementation defined and
not clearly defined in the spec how types and declarations
should be treated when being "converted to a string"?
On Friday, 19 August 2022 at 10:22:25 UTC, bauss wrote:
Is there a reason why .stringof is implementation defined and
not clearly defined in the spec how types and declarations
should be treated when being "converted to a string"?
I find it really odd that it's implementation defined and you
On Thursday, 18 August 2022 at 22:00:06 UTC, Paul Backus wrote:
On Wednesday, 17 August 2022 at 11:38:31 UTC, Steven
Schveighoffer wrote:
On 8/17/22 6:38 AM, Dennis wrote:
On Wednesday, 17 August 2022 at 08:44:30 UTC, Ogi wrote:
Maybe I’m missing something?
I had the same problem, and came u
On Wednesday, 17 August 2022 at 10:38:33 UTC, Dennis wrote:
I had the same problem, and came up with the following trick:
```D
enum itoa(int i) = i.stringof;
enum major = 3;
enum minor = 2;
enum patch = 1;
enum versionString = itoa!major ~ "." ~ itoa!minor ~ "." ~
itoa!patch;
static assert(
On Wednesday, 17 August 2022 at 11:38:31 UTC, Steven
Schveighoffer wrote:
On 8/17/22 6:38 AM, Dennis wrote:
On Wednesday, 17 August 2022 at 08:44:30 UTC, Ogi wrote:
Maybe I’m missing something?
I had the same problem, and came up with the following trick:
```D
enum itoa(int i) = i.stringof;
On 8/17/22 6:38 AM, Dennis wrote:
On Wednesday, 17 August 2022 at 08:44:30 UTC, Ogi wrote:
Maybe I’m missing something?
I had the same problem, and came up with the following trick:
```D
enum itoa(int i) = i.stringof;
```
I have the same thing in my code:
```d
enum intStr(int x) = x.string
On Wednesday, 17 August 2022 at 08:44:30 UTC, Ogi wrote:
Maybe I’m missing something?
I had the same problem, and came up with the following trick:
```D
enum itoa(int i) = i.stringof;
enum major = 3;
enum minor = 2;
enum patch = 1;
enum versionString = itoa!major ~ "." ~ itoa!minor ~ "." ~
bearophile wrote:
Lars T. Kyllingstad:
How can one, in D2, at compile time, convert an integer value (or any
other type, for that matter) to a string?
std.metastrings.ToString or std.metastrings.Format, but in D2 that Format is
buggy.
Bye,
bearophile
Thank you. ToString did the job. :) I'm
Lars T. Kyllingstad:
> How can one, in D2, at compile time, convert an integer value (or any
> other type, for that matter) to a string?
std.metastrings.ToString or std.metastrings.Format, but in D2 that Format is
buggy.
Bye,
bearophile
Lars T. Kyllingstad wrote:
How can one, in D2, at compile time, convert an integer value (or any
other type, for that matter) to a string? Here's a simplified example of
what I want to do:
import std.conv;
template Say(int N)
{
pragma(msg, to!string(N));
}
mixin S
10 matches
Mail list logo