On Friday, 16 June 2017 at 03:57:17 UTC, Adam D. Ruppe wrote:
On Friday, 16 June 2017 at 03:26:28 UTC, Jonathan Marler wrote:
[...]
The real WTF is that it returns a string in the first place. It
should return a struct.
[...]
PR Here: https://github.com/dlang/phobos/pull/5490
Currently n
On Friday, 16 June 2017 at 03:57:17 UTC, Adam D. Ruppe wrote:
On Friday, 16 June 2017 at 03:26:28 UTC, Jonathan Marler wrote:
If you have a better idea on how to implement the bitfields
template that would be great.
The real WTF is that it returns a string in the first place. It
should return
On Friday, 16 June 2017 at 03:26:28 UTC, Jonathan Marler wrote:
If you have a better idea on how to implement the bitfields
template that would be great.
The real WTF is that it returns a string in the first place. It
should return a struct.
Here, take a look at this:
-
/++
On Thursday, 15 June 2017 at 22:59:23 UTC, Adam D. Ruppe wrote:
On Thursday, 15 June 2017 at 22:36:56 UTC, Jonathan Marler
wrote:
Doesn't work with eponymous templates, like std.traits.Flag.
For example, make this code work:
That uses `.stringof` which means it is useless for anything
except
On Thursday, 15 June 2017 at 22:36:56 UTC, Jonathan Marler wrote:
Doesn't work with eponymous templates, like std.traits.Flag.
For example, make this code work:
That uses `.stringof` which means it is useless for anything
except informational printing.
Post the code you are actually doing (
On Thursday, 15 June 2017 at 21:54:44 UTC, Adam D. Ruppe wrote:
On Thursday, 15 June 2017 at 21:26:38 UTC, Jonathan Marler
wrote:
The common use case is when you'd like to mixin a type when it
is passed to a template.
That's also the most common wrong case. If it is passed to a
template, you
On Thursday, 15 June 2017 at 21:26:38 UTC, Jonathan Marler wrote:
The common use case is when you'd like to mixin a type when it
is passed to a template.
That's also the most common wrong case. If it is passed to a
template, you have a local name that you should use because it
will work despi
On Thursday, 15 June 2017 at 20:34:39 UTC, Adam D. Ruppe wrote:
On Thursday, 15 June 2017 at 19:15:55 UTC, Jonathan Marler
wrote:
I've found that the fullyQualifiedName template in std.traits
is a good tool for creating mixin code, however, it doesn't
always work.
Why is it useful? I suggest
On Thursday, 15 June 2017 at 19:15:55 UTC, Jonathan Marler wrote:
I've found that the fullyQualifiedName template in std.traits
is a good tool for creating mixin code, however, it doesn't
always work.
Why is it useful? I suggest you are probably doing it wrong.
https://stackoverflow.com/quest
I've found that the fullyQualifiedName template in std.traits is
a good tool for creating mixin code, however, it doesn't always
work.
-
import std.traits;
struct GlobalFoo
{
int x;
}
// WORKS
mixin(fullyQualifiedName!GlobalFoo ~ " globalFoo;");
unittest
{
static struct Foo
{
10 matches
Mail list logo