contracts in interfaces
Ali Çehreli
acehreli at yahoo.com
Fri Dec 14 10:28:49 PST 2012
On 12/14/2012 12:11 AM, Yann wrote:
>>> why does this produce a segmentation fault when executed:
There are quite a few bugs about interface contracts and inherited
contracts:
http://d.puremagic.com/issues/buglist.cgi?quicksearch=interface+contract
Although, I haven't seen one about segmentation faults though.
> //why do I have to add "!(false)", even though it's the default value?
> Graph g = new AdjacencyListGraph!(false)(5);
With struct and class templates, what you currently need to add is the
template parameter list, even if empty:
Graph g = new AdjacencyListGraph!()(5);
That may change in the future.
Ali
More information about the Digitalmars-d-learn
mailing list