Bug 1770 – std.typecons.defineEnum example does not compile

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2008-01-05T11:30:00Z
Last change time
2015-06-09T01:14:26Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
gide

Comments

Comment #0 by gide — 2008-01-05T11:30:40Z
Example in std.typecons for defineEnum given on the page http://www.digitalmars.com/d/phobos/std_typecons.html does not compile. Probably due to the changes made to enum in DMD version 2.009. test.d ------ mixin(defineEnum!("Abc", "A", "B", 5, "C")); C:\> dmd test.d D:\dmd\bin\..\src\phobos\std\typecons.d(234): template instance identifier 'ValueType' is not defined D:\dmd\bin\..\src\phobos\std\typecons.d(237): template instance std.typecons.StringsOnly!(255) error instantiating
Comment #1 by andrei — 2008-01-05T12:07:09Z
This looks like an installation problem. The example works properly on my system. Could you please remove and then reinstall dmd from scratch?
Comment #2 by gide — 2008-01-24T09:43:25Z
Thanks, re-installing fixed the issue.