--- Comment #2 from njb...@gmail.com 2010-03-05 12:07:18 PST ---
(In reply to comment #1)
> This sounds like a duplicate of bug 3692.
I took a look at that bug and did a little further tinkering. It seems you
might be correct.
I just removed the std.variant import directive that I hadn't mentioned (not
thinking it had anything to do with the problem) and commented-out an unrelated
class definition in the same file that used Variant, and the results are now:
1) The first line, that gave "__overloadset is not a template on line 100", now
2) The "foreach (string k; _states.keys)" approach now compiles fine.
3) The "foreach (State!(T) s; _states.values)" approach now compiles fine.
4) The "foreach (char k; _states.keys.sort)" approach now gives an
appropriate error message (cannot implicily convert expression etc) instead of
crashing with an assertion.
5) The final approach where I do declare State!(T) as a new typedef called
'tstate' and then do "foreach (tstate s; _states.values)" gives an error
message instead of crashing -- "cannot implicitly convert expression"... which
is surprising, though unrelated to what this bug report is about, and I'm not
sure if I should submit another report on this particular thing because maybe
doing typedefs on templated-classes is intentionally not-allowed?
Anyway, I think you're right... removing any and all mention of std.variant
from the source file changed the situation entirely.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------