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] | |
Hi everybody ! There's a behaviour in STL allocator I don't understand, I hope somebody can help me... I'm trying to customize an allocator to track the insertion/deletion of objects in a container, decorating the standard allocator functions construct() and destroy(). The problem is that it seems that those functions are never called in STL containers, instead a global template function _Construct() (defined in <stl_construct.h>) is called, that is completely unaware of allocators. Is this the supposed behaviour ? So, what is the utility of those construct() /destroy() functions ? Is there a way to achieve a similar functionality ? Thanks for any help ! :) ps: I attached the source and the output of the simple test allocator I did, as you can see from the output construct() and destroy() are never called... Pyper. ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
Attachment:
alloc_test.cpp
Description: Binary data
Attachment:
alloc_test.out
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |