Can we have this Syntactic sugar.
Long Chang
changedalone at gmail.com
Tue Nov 24 03:13:24 PST 2009
class RegExp
{
enum Option{
X, Y, Z
}
int options;
this(int options = 0){ this.options = options; }
}
void main(){
auto reg = new RegExp("^A.", .Option( X |Y|Z ) );
assert( RegExp .Option.X | RegExp .Option.Y| RegExp .Option.Z ==
reg.options );
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20091124/193496af/attachment.html>
More information about the Digitalmars-d
mailing list