inline enum in function declaration

Lionello Lunesu lio at lunesu.remove.com
Mon Jun 12 07:10:57 PDT 2006


On second thought I also think it should be limited to anonymous enums. 
This will get rid of the enum's namespace as well.

The feature should be easy to implement when done as an anonymous global 
enum, but then there's no type checking. It would be nice if the 
compiler could only allow the enum's values for that parameter, and 
maybe even vice-versa: to only allow the enum's values inside the 
function call.

What about parameter default values?
#void Invalidate( enum{no_redraw,redraw} =redraw );

L.



More information about the Digitalmars-d mailing list