Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // doesn't compile
- import std.stdio;
- import gfm.math.matrix;
- void test(T...)(T[] types)
- {
- best(types);
- }
- void best(T...)(T[] types)
- {
- foreach(t ; types)
- {
- writefln("%s: %s", typeof(t).stringof, t.sizeof);
- }
- }
- void main()
- {
- float foo;
- mat4x4f bar;
- float[3] baz;
- bar.c[0][0] = 25.0f;
- test!(typeof(foo), typeof(bar), typeof(baz))(foo, bar, baz);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement