allocator
C++ : Why isn't my call to "std::uninitialized_copy" working?
I building a simple class that is supposed to mimic the functionality of the std::string class (as an exercise!):[详细]
2023-02-08 12:48 分类:问答Overload Allocator and deallocator of stl::map in c++
Is it possible to overload allocator/deallocator of stl::map in c++? If yes then how? An开发者_Python百科y help would be appreciated.Yes, you can specify it as a template argument:[详细]
2023-02-04 02:22 分类:问答Overriding new but telling unordered_map not to use it
I\'m writing a garbage collector for C/C++ as a programming exercise, and part of this involves globally overriding new. However, the garbage collector also uses an unordered_map (to store pointers to[详细]
2023-01-30 20:34 分类:问答Second argument to std::vector
Looking at vector, I realized that I have never used the second argument when creating vectors. std::vector<int> myInts; // this is what I usually do[详细]
2023-01-30 05:39 分类:问答Associative container - exception rather than default-construct in C++
I\'m looking for an associative container in C++, where rather than requiring it\'s elements to be default-constructible, will throw an exception where a key is requested that isn\'t found - edit: in[详细]
2023-01-26 21:43 分类:问答llvm-gcc std::allocator bug?
The code: #include <vector> #include <stack> using namespace std; class blub {}; class intvec : public std::vector<int, std::allocator<int> >, public blub {};[详细]
2023-01-25 10:54 分类:问答How to replace allocators of stl with actual source code
I need to replace allocators with their original source code. I am extracting exported methods from the PE export table and facing strange lengthy allocators where STL containers were used in the orig[详细]
2023-01-09 15:39 分类:问答How can I make an object construct itself at a particular location in memory? [duplicate]
This question already has answers here: Closed 12 years ago. 开发者_如何学Go Possible Duplicate: Create new C++ object at specific memory address?[详细]
2023-01-07 02:19 分类:问答Generic allocator class without variadic templates?
I am trying to write a generic allocator class that does not really release an object\'s memory when it is free()\'d but holds it in a queue and returns a previously allocated object if a new one is r[详细]
2022-12-25 21:30 分类:问答shared memory STL maps
I am writing an Apache module in C++. I need to store the common data that all childs need to read as a portion of shared memory. Structure is kind of map of vectors, so I want to use STL map and vect[详细]
2022-12-25 15:02 分类:问答