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: container<POD> refactoring


Joe Buck <Joe.Buck@synopsys.COM> writes:

| Has anyone done any thinking about adding specializations for avoiding
| bloat with containers of POD types?  For std::vector, it seems that all
| of the out-of-line functions other than the == and < operators depend
| only on the size of the POD, and nothing else.

I would say this is something best done at the linker level.
User-codes may detect -- at program source level -- whether we
specialize or not.

I've heard persistent reports that Microsoft's linker is capable (and is
actually doing it) of sharing morally same specializations codes.

| 
| Just specializing container<T*> would be easier, and a win for some.
| But a complete job might manage to have one copy, in the library, of
| out-of-line code for almost all container<POD> functions that use the
| default allocator.

-- 
                                                        Gabriel Dos Reis
                                                         gdr@cs.tamu.edu
	 Texas A&M University -- Computer Science Department
	301, Bright Building -- College Station, TX 77843-3112


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