Re: opDispatch compiles fine, but still fails to resolve?

2014-08-09 Thread Artur Skawina via Digitalmars-d-learn
On 08/09/14 03:20, Vlad Levenfeld via Digitalmars-d-learn wrote: More opDispatch woes. This feature keeps biting me, yet I keep trying to use it. This time I'm trying to access elements of a vector GLSL-style (without swizzling... for now). Here's the relevant code: struct Vector

Re: opDispatch compiles fine, but still fails to resolve?

2014-08-09 Thread Vlad Levenfeld via Digitalmars-d-learn
On Saturday, 9 August 2014 at 10:36:55 UTC, Artur Skawina via Digitalmars-d-learn wrote: On 08/09/14 03:20, Vlad Levenfeld via Digitalmars-d-learn wrote: More opDispatch woes. This feature keeps biting me, yet I keep trying to use it. This time I'm trying to access elements of a vector

Re: opDispatch compiles fine, but still fails to resolve?

2014-08-09 Thread Vlad Levenfeld via Digitalmars-d-learn
On Saturday, 9 August 2014 at 05:42:09 UTC, H. S. Teoh via Digitalmars-d-learn wrote: Why would having opDispatch actually generate compile errors cause problems for __traits(compiles,...)? __traits(compiles...) already works fine with a whole bunch of other non-compiling stuff (by gagging

opDispatch compiles fine, but still fails to resolve?

2014-08-08 Thread Vlad Levenfeld via Digitalmars-d-learn
More opDispatch woes. This feature keeps biting me, yet I keep trying to use it. This time I'm trying to access elements of a vector GLSL-style (without swizzling... for now). Here's the relevant code: struct Vector (uint length, Element = double) { ref @property component

Re: opDispatch compiles fine, but still fails to resolve?

2014-08-08 Thread Meta via Digitalmars-d-learn
On Saturday, 9 August 2014 at 01:20:33 UTC, Vlad Levenfeld wrote: More opDispatch woes. This feature keeps biting me, yet I keep trying to use it. This time I'm trying to access elements of a vector GLSL-style (without swizzling... for now). Here's the relevant code: struct Vector (uint

Re: opDispatch compiles fine, but still fails to resolve?

2014-08-08 Thread Vlad Levenfeld via Digitalmars-d-learn
Yep, replacing @property with auto did the trick. The lack of error messages in opDispatch is frustrating. I realize that, due to tricks like __traits(compiles, Foo.testing_for_some_function), having opDispatch stop compilation if it fails is not going to work, but there's gotta be some way

Re: opDispatch compiles fine, but still fails to resolve?

2014-08-08 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Aug 09, 2014 at 05:34:40AM +, Vlad Levenfeld via Digitalmars-d-learn wrote: Yep, replacing @property with auto did the trick. The lack of error messages in opDispatch is frustrating. I realize that, due to tricks like __traits(compiles, Foo.testing_for_some_function), having