container class sample on Tango mainpage can not compile

2009-01-04 Thread Sam Hu
Hi, The sample of Tango container class,Comparators section: http://www.dsource.org/projects/tango/wiki/ChapterStorage#Comparators can not compile.I just don't know why.Please help on this. //dcomp.d module dcomp; import tango.util.collection.TreeBag; import tango.io.Stdout; import tango.text.Asci

container class sample on Tango mainpage can not compile

2009-01-04 Thread Sam Hu
Hi, The sample of Tango container class,Comparators section: http://www.dsource.org/projects/tango/wiki/ChapterStorage#Comparators can not compile.I just don't know why.Please help on this. //dcomp.d module dcomp; import tango.util.collection.TreeBag; import tango.io.Stdout; import tango.text.Asci

Re: Two Tango container package

2009-01-04 Thread Sam Hu
OK,so which one is equivelant to ArrayBag in the container module?I found Vector is not the same as c++ std::vector<>does,while ArrayBag in the collection module looks more like.If the collection module deprecates in the future,which one in the container module will act as ArrayBag? Thanks. Sam

Re: Struct copy, how?

2009-01-04 Thread Daniel Keep
Christopher Wright wrote: Daniel Keep wrote: Off the top of my head, it wouldn't be terribly hard. What you would need is a global 'ddup' (deep-dup) function. The generic case would look something like: T ddup(T)(ref T value) { T result; foreach( i,f ; value.tupleof ) resu

Re: .bat file to help compile easier - dmd/build

2009-01-04 Thread Christopher Wright
Daniel Keep wrote: I'm surprised you didn't call me out on the evil monster that is Tango's Variant type. Or the Zip code. I really need to find time to go through all the bugs against that stuff and fix them all... Tango's Variant works for anything you give it. That's a bit more than I ca

Re: Struct copy, how?

2009-01-04 Thread Christopher Wright
Daniel Keep wrote: Off the top of my head, it wouldn't be terribly hard. What you would need is a global 'ddup' (deep-dup) function. The generic case would look something like: T ddup(T)(ref T value) { T result; foreach( i,f ; value.tupleof ) result.tupleof[i] = ddup(f);

Re: .bat file to help compile easier - dmd/build

2009-01-04 Thread Lutger
John Reimer wrote: > Hello tim, > >> On Sun, 04 Jan 2009 01:40:03 +1300, John Reimer >> wrote: >> >>> Hello Don, >>> Tim M wrote: > On Sat, 03 Jan 2009 08:17:17 +1300, Michael P. > wrote: >> Okay, so right now, I'm making a small game(Mario) using DAllegro. >> I >>

Re: Struct copy, how?

2009-01-04 Thread Daniel Keep
nobody wrote: "bearophile" wrote in message news:gjn7s1$1vk...@digitalmars.com... nobody: BCS: However this still has a few problems: 1, if claw contains a reference type you will now have 2 Claws that refer to the same thing and 2, you need to maintain opAssign to be sure that it copies all

Re: .bat file to help compile easier - dmd/build

2009-01-04 Thread Daniel Keep
John Reimer wrote: Hello Daniel, John Reimer wrote: [snip] Probably more history here than you, but it was kind of fun looking back on it. If anyone sees some inaccurancies, be sure to correct. -JJR "inaccurancies" should be "inaccuracies". :P Thanks for the look back. -- Daniel