MSVC std::vector and aligned data

Started by
21 comments, last by mrbastard 12 years, 6 months ago
FWIW, I decided to use btAlignedObjectArray; learning to write a custom allocator is a task for another day. I'm still fairly new to the use of aligned memory and whatever eases the curve is a short-term win.
Advertisement
After reading this thread back in October, I had submitted a bug report to Microsoft about vector resize not taking a const reference. Some research had shown that it had been previously requested to be changed to a const reference, but it had been rejected to be fixed.

As you can see by the first link, this wll be fixed in VC11.


Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in VC11.

Amusingly, when this was originally reported in July 2006 (months before I joined the VC team), this was indeed By Design. C++03 23.2.4.2 [lib.vector.capacity]/6 specified:

void resize(size_type sz, T c = T());

Now, C++11 23.3.6.3 [vector.capacity]/9, 11 specifies:

void resize(size_type sz);
void resize(size_type sz, const T& c);

This change was introduced in March 2008's Working Paper N2588.

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
[/quote]

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]


As you can see by the first link, this wll be fixed in VC11.


I just had a quick check - this is in the version of <vector> in the vc11 developer preview.


[size="1"]

This topic is closed to new replies.

Advertisement