This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: STL and explicit template instantiation


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]