STL and explicit template instantiation

Paolo Carlini pcarlini@suse.de
Thu Sep 28 17:09:00 GMT 2006


Benjamin Kosnik wrote:

>>Now of course the follow on question since I poked at this some more.
>>Why would the 
>>
>>__uninitialized_fill_n_aux
>>__uninitialized_fill_n_a
>>
>>template function not be inlined when all other template functions in
>>the stl_uninitialized.h header are inlined? Could this be considered as
>>a bug? When I hack the header to inline these template functions the
>>problem goes away, as expected based on your answer.
>>    
>>
>Perhaps. These functions look to be inlined inconsistently, at least at
>first glance.
>
As far as I can see, only the overload of __uninitialized_fill_n_a 
taking std::allocator is so trivial to warrant very safe inlining (it 
just forwards to std::uninitialized_fill_n). I'm going to adjust that 
(barring objections).

Note, however, that this change doesn't "fix" the issue debated here, 
which, contrary to the initial report in this thread, was *already* 
there pre-4.0 compiler + library (I tried 3.3.4 and 3.4.4).

Paolo.



More information about the Libstdc++ mailing list