LinkedList and Deque API in DCollections

Steven Schveighoffer schveiguy at yahoo.com
Mon Jun 25 06:44:12 PDT 2012


On Thu, 21 Jun 2012 10:24:57 -0400, d coder <dlang.coder at gmail.com> wrote:

>>
>>
>> Did you try : list.insert(list.begin, value);
>>
>
> Thanks. But I believe append and prepend are too common use-cases to be
> ignored.
>
> Also, I see that "assert(some-expression)" has been used at a lot of  
> places
> in the code of the libraries. Since these libraries are built with  
> -release
> option, should these assert statements not be replaced by "enforce"?

No, if you want to use those asserts, build dcollections with debug flag.   
It's quite impossible for me to tell whether you want the asserts or not.   
There isn't currently an easy way to build without -release with my build  
scripts, I should add that.

Also note that in most cases, you will not have to do this -- all  
dcollections objects are templates, which means they get instantiated in  
non-release mode if that's how you compile your code that uses it.

-Steve


More information about the Digitalmars-d mailing list