I think we need a range interface if people want to open
multiple boxes at once.
On Thu, 2 Aug 2012, Andrej Mitrovic wrote:
On 8/2/12, Andrej Mitrovic <[email protected]> wrote:
Make it 'auto' and it might just work. :p
struct box
{
T opCast(T : bool)()
{
static T state;
state = !state;
return state;
}
static auto open()
{
return typeof(this)();
}
}
void main()
{
auto alive = box.open();
assert(alive && !alive);
}
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta