Should this work?
struct V(string s) {
}
struct S(int U) {
V!xyz x;
alias x this;
}
void main() {
S!10 a;
static assert(is(a : V!Args, Args...));
}
With DMD Git master, the static assert() fails. Should it? Am I
doing something wrong?
On 03/15/2015 08:47 AM, Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net wrote:
Should this work?
struct V(string s) {
}
struct S(int U) {
V!xyz x;
alias x this;
}
void main() {
S!10 a;
static assert(is(a : V!Args,
On Sunday, 15 March 2015 at 16:44:14 UTC, Ali Çehreli wrote:
On 03/15/2015 08:47 AM, Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net wrote:
Should this work?
struct V(string s) {
}
struct S(int U) {
V!xyz x;
alias x this;
}
void main() {
https://issues.dlang.org/show_bug.cgi?id=14286
In the meantime, does someone know of a suitable workaround?
On Sunday, 15 March 2015 at 16:53:34 UTC, Marc Schütz wrote:
On Sunday, 15 March 2015 at 16:44:14 UTC, Ali Çehreli wrote:
On 03/15/2015 08:47 AM, Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net wrote:
Should this work?
struct V(string s) {
}
struct S(int U) {
V!xyz
On Sunday, 15 March 2015 at 18:53:33 UTC, Nicolas Sicard wrote:
Can be reduced to:
struct Foo(int i) {}
alias Foo1 = Foo!1;
static assert(is(Foo!2 == Foo1!T, T...)); // OK
I think it's another bug.
Right, I've filed another report:
https://issues.dlang.org/show_bug.cgi?id=14290
On Sunday, 15 March 2015 at 17:03:42 UTC, Marc Schütz wrote:
https://issues.dlang.org/show_bug.cgi?id=14286
In the meantime, does someone know of a suitable workaround?
I found the following workaround. Not beautiful, but it works:
enum isValue(alias T) = __traits(compiles, typeof(T));
On Sunday, 15 March 2015 at 18:33:32 UTC, Marc Schütz wrote:
On Sunday, 15 March 2015 at 17:03:42 UTC, Marc Schütz wrote:
https://issues.dlang.org/show_bug.cgi?id=14286
In the meantime, does someone know of a suitable workaround?
I found the following workaround. Not beautiful, but it works: