Jump to content

  • Log In with Google      Sign In   
  • Create Account


MSVC std::vector and aligned data


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#21 yckx   Prime Members   -  Reputation: 1163

Like
0Likes
Like

Posted 06 October 2011 - 01:12 AM

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.

Sponsor:

#22 Rattrap   Members   -  Reputation: 1567

Like
1Likes
Like

Posted 05 November 2011 - 08:56 AM

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



#23 mrbastard   Members   -  Reputation: 1573

Like
1Likes
Like

Posted 05 November 2011 - 09:52 AM

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.








Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS