[Issue 23171] New: You can't use std.typecons.Typedef on __vector(*) type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 7 19:57:08 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23171
Issue ID: 23171
Summary: You can't use std.typecons.Typedef on __vector(*) type
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: leo.labruyere at pm.me
```
import std.typecons : Typedef;
import core.simd : double2;
alias fooBar = Typedef!double2;
void main()
{
fooBar foo;
}
```
The previous piece of code give the following error :
Error: expression `cast(__vector(double[2]))[nan, nan]` is not a valid template
value argument
Thus, it is not possible to create Typedef on vectorial type (or struct / class
with a vectorial type attribute)
--
More information about the Digitalmars-d-bugs
mailing list