On 15/01/12 10:29 PM, Philippe Sigaud wrote:
On Sun, Jan 15, 2012 at 22:19, Timon Gehr wrote:
Nick:
Goddamnnit, what the fuck is wrong with me? Yes that works :)
I suspect a better error message would have prevented this.
DMD still has some potential of improvement in that area. =)
In that
On Sun, Jan 15, 2012 at 22:19, Timon Gehr wrote:
Nick:
>> Goddamnnit, what the fuck is wrong with me? Yes that works :)
>
> I suspect a better error message would have prevented this.
> DMD still has some potential of improvement in that area. =)
In that case, to!(Origin, Target) could be extend
On 01/15/2012 10:02 PM, Nick Sabalausky wrote:
"Timon Gehr" wrote in message
news:jevefv$2je6$1...@digitalmars.com...
On 01/15/2012 09:34 PM, Nick Sabalausky wrote:
import std.conv;
enum Foo { hello }
enum x = to!string();
enum x = to!string(Foo.hello);
Goddamnnit, what the fuck is wrong
"Timon Gehr" wrote in message
news:jevefv$2je6$1...@digitalmars.com...
> On 01/15/2012 09:34 PM, Nick Sabalausky wrote:
>> import std.conv;
>> enum Foo { hello }
>> enum x = to!string();
>>
>
> enum x = to!string(Foo.hello);
Goddamnnit, what the fuck is wrong with me? Yes that works :)
On 01/15/2012 09:34 PM, Nick Sabalausky wrote:
import std.conv;
enum Foo { hello }
enum x = to!string();
enum x = to!string(Foo.hello);
"Jonathan M Davis" wrote in message
news:mailman.388.1326617938.16222.digitalmars-d-le...@puremagic.com...
> On Sunday, January 15, 2012 03:53:09 Nick Sabalausky wrote:
>> Is there a way to get the name of an enum value at compile-time?
>>
>> For instance:
>>
>> import std.stdio;
>> enum Foo { he
On Sunday, January 15, 2012 03:53:09 Nick Sabalausky wrote:
> Is there a way to get the name of an enum value at compile-time?
>
> For instance:
>
> import std.stdio;
> enum Foo { hello }
> void main()
> {
> writeln(Foo.hello);
> }
>
> That prints "hello". But what I need is to get "hello" i
Is there a way to get the name of an enum value at compile-time?
For instance:
import std.stdio;
enum Foo { hello }
void main()
{
writeln(Foo.hello);
}
That prints "hello". But what I need is to get "hello" into a string at
compile-time.
Of course, I could just manually write a ctfe-able "