Hey there,

I'm wondering how I can use a template function within my mixin:

```
                ubyte[] value = x[33, 3a,3f, d4];
foreach (type; TypeTuple!("int", "unsigned int", "byte"))
                {
                    mixin(`if (value.length == type.sizeof)
                            {
ubyte[type.sizeof] raw = value[0..$]; auto fValue = raw.littleEndianToNative!(type);
                                displayinfo(fValue);
                            }
                            break;
                        `);
                }
```


Error: template std.bitmanip.littleEndianToNative cannot deduce function from argument types !("int")(ubyte[8]), candidates are: [..]\src\phobos\std\bitmanip.d(2560,3): std.bitmanip.littleEndianToNative(T, uint n)(ubyte[n] val) if (canSwapEndianness!T && n == T.sizeof)

```
`raw.littleEndianToNative!` ~ type ~ `;`
```

neither works..

Any way to accomplish this?

Reply via email to