[Issue 4997] names, values, length and basetype enum properties

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4997

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P4

--


[Issue 4997] names, values, length and basetype enum properties

2018-05-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4997

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com

--- Comment #6 from Dmitry Olshansky  ---
Could be easily superseeded by coming introspection DIP

--


[Issue 4997] names, values, length and basetype enum properties

2014-03-19 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4997


Infiltrator  changed:

   What|Removed |Added

 CC||ah0801...@yahoo.com


--- Comment #5 from Infiltrator  2014-03-19 03:56:10 
PDT ---
*** Issue 5099 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4997] names, values, length and basetype enum properties

2012-07-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4997


Tommi  changed:

   What|Removed |Added

 CC||tommitiss...@hotmail.com


--- Comment #4 from Tommi  2012-07-16 10:02:50 PDT ---
(In reply to comment #3)
> Two other useful properties are "succ" and "pred", to be used similarly to:

I'd use rather the names they chose in C++11 std lib: "next" and "prev" (stands
for previous)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4997] names, values, length and basetype enum properties

2012-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4997



--- Comment #3 from bearophile_h...@eml.cc 2012-05-27 10:56:27 PDT ---
Two other useful properties are "succ" and "pred", to be used similarly to:

enum MyEnum : ushort {
FOO  = 10,
BAR  = 20,
BAZ  = 40,
SPAM = 30
}

static assert(MyEnum.BAR.meta.succ == MyEnum.BAZ);
static assert(MyEnum.BAR.meta.pred == MyEnum.FOO);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4997] names, values, length and basetype enum properties

2012-05-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4997



--- Comment #2 from Andrej Mitrovic  2012-05-01 
15:46:12 PDT ---
What would really help is if you could have properties for types, something
akin to:

@property int length(T)()
if (is(T == enum))
{
return __traits(allMembers, T).length;
}

That won't work, but that's the basic idea. Then you could put these functions
into Phobos instead of complicating the language. Of course if the above work
it would also complicate the language, so I dunno..

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4997] names, values, length and basetype enum properties

2012-05-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4997


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2012-05-01 
15:39:39 PDT ---
*** Issue 8012 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---