[sldev] STL port (was about LLLinkedList and container replacements)

Dzonatas dzonatas at dzonux.net
Wed Jun 27 06:19:12 PDT 2007


One more thing to note, I have already done work on scripts to recompile 
the viewer with STL under GCC.  And of note, GCC can produce Win32 
executables also with STL.

(MSVCRT is buggy by itself, the MS compilers have just been compiling in 
workarounds instead of directly updating the lib)

There *may* be a problem to just drop in STL on the Express version of 
VC8. That'll have to be researched more. I'm sure someone has figured 
out a way to do it.

The scripts are located on OSLCC. They compile everything under GCC. 
Just replace the standard GCC with the STL-port enabled GCC, and it works.

Dzonatas wrote:
> Kelly Washington wrote:
>> If anyone submits a patch that removes ALL uses of LLLinkedList (or any
>> other home-brewed container class in our code) in favor of a std::
>> equivelant I will personally work to get it into the release code as
>> fast as possible.  This is a non-trivial task though.
>>   
>
> When someone asks one to write a linked list in C++ or C, it is not so 
> trivial for many reasons. I'll just touch on the portable issue and 
> avoid the legal patent issues (and other patent nonsense).
>
> One could just write it out in plain C with full implementation and 
> avoid any C++ containers. I'm sure C++ programmers usually bark at 
> this technique. Actually, I know this because C++ programmers tend to 
> watch the clock for how much time it takes to write out the 
> implementation.
>
> C++ programmers, instead, would rather see something like std::vector 
> being used. It is quick to implement and probably avoids that jerky 
> head look at the clock. The std::vector (and like) container(s) are 
> not pure linked lists, however. They rely more on dynamic arrays. The 
> benefits of a linked list are lost.
>
> The trivial solution is to move the compiler to include the STL 
> library, which is not in use by default. Then one could use the 
> std::list<> template.
>
> The STL library also adds the additional benefit of cross platform 
> compatibility. For example, many of the wide character implementations 
> under MSVC's STD library are not portable.  The STL library is the 
> answer to make it portable.
>
> I'd jump on it, but I have a treasury program of higher priority to 
> write, first.
>

-- 
Power to Change the Void


More information about the SLDev mailing list