Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7036293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:24:25+00:00 2026-05-28T01:24:25+00:00

I use visual studio 2010 and its stl implementation is from dinkumware I noticed

  • 0

I use visual studio 2010 and its stl implementation is from dinkumware

I noticed that when internal buffer of vector grows, there is a _Uninitialized_move is called. which is much like std::uninitialized_copy.

  1. for scalar type, it eventually forwards call to memmove
  2. for non-scalar type, it will call copy constructor of contained type.

I know that for non-scalar type, bit-wise coping isn’t safe, but I am get confused in this case, because the old objects will be destroyed very soon. it looks like that bit-wise coping for all types is safe, and hence we only need free raw buffer after _Uninitialized_move. this will save lots of copy constructor and destructor for non-trivial objects.

so, is it safe to just move contents for non-scalar type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:24:25+00:00Added an answer on May 28, 2026 at 1:24 am

    If you’re completely sure that objects you move don’t have pointers to each other (subobjects of those included) – then just moving contents is okay. However you can’t know that unless you know how the type is designed inside. One exception is that if the type is not larger than a pointer (sizeof(Type) <= sizeof( void* )), then it is very unlikely to have pointers to objects in the same container, so usually it can be just moved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use visual studio 2010. But it seems that the .sln file
Does anyone know if it is possible to use Visual Studio 2010 RC with
How to export use case diagram in visual studio 2010 as image? jpg or
I experienced a Problem in Visual Studio 2010 and i dont know if its
Taken from Exercise 1: Creating Windows Phone Applications with Microsoft Visual Studio 2010 Express
I use the Pending Changes window in Visual Studio 2010 to manage my files
I wrote an application that installs using the Visual Studio 2010 Setup Project. As
We are trying to upgrade our code base to use Visual Studio 2010 but
Is there any way to use ExtJs.Net in visual studio 2010 at design time
I use Visual Studio 2008. I haven't seen this behavior before and, as far

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.