Summary: Erroneous recursive call in template instantiation
--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-08-29
19:49:09 PDT ---
For lack of a better name..
void Foo(Method method = Method.A)()
void Foo(Method method : Method.A)()
void Foo(Method method : Method.B)()
Foo!(); // dispatch, Foo A
Foo(); // dispatch, Foo A
That works. Now uncomment the first instantiation, the `Foo!()` part and
compile and run. The "dispatch" template instance keeps calling itself until
the stack is blown and the app exits.
What I was trying to do with code like the above was to use template
overloading with type specialization to switch between different types of
drawing methods. The default "dispatch" template is there in case the user
doesn't care which drawing method to use, the dispatch would then instantiate a
specialized template (one specialized for Method.A in this case).
But as you can see, this is buggy territory..
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------