Summary: "static" allows free templated functions to accept
struct fields as template alias parameters
--- Comment #0 from Vladimir Panteleev <thecybersha...@gmail.com> 2012-03-31
07:20:50 PDT ---
string f(alias X)()
This program doesn't compile, however uncommenting "static" makes it work.
DMD 2.058 produces this error message:
test.d(8): Error: struct test.S no size yet for forward reference
DMD git produces a different error message:
test.d(2): Error: function test.S.f!(i).f need 'this' to access member f
Note that fixing this issue by making both cases fail to compile would break
code. I believe the Orange serialization library uses this trick to stringify
field names with minimal syntax overhead.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------