Using the Allocator Argument to C++ STL Template Classes

The interface to scalable_allocator and cache_aligned_allocator is identical to std::allocator and conforms to the relevant requirements in the ISO C++ standard, so you can use either as the allocator argument to STL template classes. The following code shows how to declare an STL vector that uses cache_aligned_allocator for allocation:

	std::vector< int, cache_aligned_allocator<int> >;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.211.66