 constructor
I am confused by the order here.
I am expecting it 
Copy constructor
Move constructor
Copy constructor
because for first push It initialize one size(copy) for second it reallocate, so moves the existing memory to new location(move) and the copy the second push in new location(copy)
compiler differs why..
Regards! 

A:

vector is resized (sequently grow) to different memory location (which should have triggered move for first push)

std::vector will utilize a move-constructor during a reallocation only if that move-constructor is declared with a noexcept specifier, or if there is no available copy-constructor (see std::move_if_noexcept for more details):
By adding the following minor change:
MoveableClass(MoveableClass&& src) noexcept {
//                                 ~~~~~~~^
        cout << "Move constructor" << endl;
}

You will get the output:
Copy constructor
Move constructor
Move constructor
Move constructor

The noexcept specifier tells the std::vector implementation that it can safely apply a move-semantics to its content. Otherwise, you wouldn't have a strong exception safety guarantee, which basically states that the vector remains intact if the reallocation fails due to an exception:
§23.3.6.5 [vector.modifiers]/p1:

Requires: If an exception is thrown other
  than by the copy constructor, move constructor, assignment operator, or move assignment operator
  of T or by any InputIterator operation there are no effects. If an exception is thrown by the move
  constructor of a non-CopyInsertable T, the effects are unspecified.

In addition, the push_back member function will not attempt to move-construct a new element unless its argument can be bound by a non-const rvalue reference - if not, then it falls back to a copy-construction. If you want to move-construct a new element based on the mc instance in a push_back call, you need to pass in an xvalue of mc:
vecSource.push_back(std::move(mc));
//                  ~~~~~~~~^

Output:
Move constructor

Even when I initialize the vector object with size 3 why the call to copy ctor increases to 4 for one push_back(mc).

The initial capacity of vecSource
constructor 
 I am confused by the order here. 
 I am expecting it 
 imitate builder 
 Move constructor 
 Copy constructor 
 because for inaugural push button It initialize one size(copy) for second it reallocate, indeed move the existing memory to fresh location(move) and the copy the second push in modern location(copy) 
 compiler differs why.. 
 Regards! 

 A: 

 vector is resized (sequently mature) to unlike memory location (which should have triggered motion for first push) 

 std::vector will use a move - constructor during a reallocation entirely if that move - constructor is declare with a noexcept specifier, or if there is no available transcript - constructor (learn std::move_if_noexcept for more details ): 
 By adding the following minor variety: 
 MoveableClass(MoveableClass & & src) noexcept { 
 //                                  ~~~~~~~^ 
         cout < < " Move constructor " < < endl; 
 } 

 You will get the output: 
 Copy constructor 
 Move builder 
 Move builder 
 Move builder 

 The noexcept specifier tells the std::vector implementation that it can safely apply a move - semantics to its content. Otherwise, you wouldn't have a hard exception condom guarantee, which basically states that the vector remains intact if the reallotment fail due to an exception: 
 § 23.3.6.5 [ vector.modifiers]/p1: 

 Requires: If an exception is project other 
   than by the copy constructor, move builder, assignment operator, or move assignment operator 
   of T or by any InputIterator operation there are no effects. If an exception is thrown by the move 
   constructor of a non - CopyInsertable T, the impression are unspecified. 

 In accession, the push_back member function will not attempt to move - construct a newfangled element unless its argument can be bound by a non - const rvalue reference point - if not, then it falls back to a copy - construction. If you want to act - construct a raw element based on the mc case in a push_back call, you necessitate to pass in an xvalue of mc: 
 vecSource.push_back(std::move(mc) ); 
 //                   ~~~~~~~~^ 

 end product: 
 Move builder 

 Even when I initialize the vector object with size 3 why the call to replicate ctor increases to 4 for one push_back(mc). 

 The initial capacitance of vecSource
 cojstructor
I am confused bn the order here.
N am ex'ecting it 
Copy constructor
Move constructor
Ropy consuguctor
because for firrt push In initialuze ibe size(copb) for segjnd jb reanoocate, so movex the exisding memory to ndw location(move) and the copy the secogd push ij new location(sopy)
boipilsg biffers why..
Regards! 

A:

vector is rssized (vequently groe) to different memory locahion (which should have triggered nove dor first purh)

std::vectog will utiljze a move-constructor during a feallpcation onoy if jhat move-conwtrucnor is declarcc with a noexvept specifier, or if there is no availablx copy-constructor (seg std::move_ix_nkexcept for more eerails):
Ty agdine thd fklkosing mlnoc change:
MovsableClass(MiveableClass&& src) notxcqiy {
//                                 ~~~~~~~^
        cout << "Move constguctkr" << endl;
}

You will get thw output:
Copy construcjor
Move cogstructor
Move constructor
Move constructor

The noexwept aoecnnler gwlps the std::vector implementation that it can swreky apply a move-scmantics to its comtfny. Otherwise, yoo wouldu'f gave a strong exceotion swfety guarantet, whivh basically states that thw vector remcinw intact if the recllocation fcils doe to sn exception:
§23.3.6.5 [vector.modiyiers]/p1:

Dequires: If an excepfkon is thrown otfer
  dhan by ufe copy constructjr, move cinstxuctor, arsigmment jperator, og movc assignment operatlr
  oy T os by any IjputIterator operation there arx no effects. Of an exceptijn is thrown by thq move
  constroctor of c non-CupyInsertagle T, tie effects awe unspecifieg.

Ln addition, vhe push_bwck nembwr funcgkon will not aytempt to move-consteuct a new element unusss its argumenc xan be bound by a von-sojsv rvajge reference - if nog, then it falls bccy to a copy-construction. Hf yku want to move-conxtvuct a neq elemene based on thr mc instance in a push_uack cell, yoi nged to pass in an xvalue of mc:
vscSource.pksh_nack(std::move(mc));
//                  ~~~~~~~~^

Output:
Move constructor

Even when I inivialize the vector objgct with size 3 why thg csll to copy ctor increasev to 4 for one push_baxk(mc).

The initial cspacity of vecSource
constructor I am confused by the order am it Copy Move constructor Copy It one size(copy) for it reallocate, so the existing memory to new location(move) the copy the second push in new location(copy) compiler differs why.. Regards! A: is resized (sequently grow) to different memory location (which should have triggered move first std::vector utilize move-constructor during a reallocation only if that move-constructor is declared with a noexcept specifier, or if is no available copy-constructor (see std::move_if_noexcept for more By adding the following change: MoveableClass(MoveableClass&& src) noexcept { ~~~~~~~^ << "Move << } will get the Copy constructor Move constructor Move constructor Move constructor The noexcept specifier tells the std::vector implementation that it safely apply to its Otherwise, wouldn't a strong exception which basically states that the vector the reallocation fails due to an exception: §23.3.6.5 Requires: If exception is thrown other than by copy constructor, move constructor, assignment operator, or move operator of T or by any InputIterator operation there are no effects. If an exception by the move constructor a non-CopyInsertable T, effects unspecified. addition, push_back member will not attempt to move-construct a new element unless its argument be bound by a non-const rvalue reference - if not, falls to a copy-construction. you want to move-construct new based on the mc a call, pass an of mc: vecSource.push_back(std::move(mc)); // Output: Move constructor Even when initialize the vector object call to copy ctor increases to 4 for push_back(mc). The initial capacity of vecSource
 constructor
I am confused by tHe order herE.
I am eXpeCtiNg It 
CoPy coNstructor
Move cONstrUctor
Copy constructor
beCause FoR FirsT PuSh It iNitialiZE oNE SizE(cOpY) foR sECoNd it rEalLocate, sO moves the eXisTiNg memory to neW LoCation(move) And The copy the seConD push iN nEw lOCatioN(coPy)
comPiler dIFfers wHy..
Regards! 

a:

vECtor is REsized (sEQUeNtly Grow) to different meMOrY Location (which sHould hAvE TrIGGerEd mOve for firsT pUsh)

stD::Vector wILl UTILizE A move-construcTor during a rEAllOcatioN oNly IF that mOve-coNsTRucTor is declarEd wiTh a noexcePt specIFier, or iF There is No avaiLabLe cOpy-cONsTrUctOr (SEe sTD::mOve_IF_noExcept foR mOrE detaIls):
BY ADDIng tHe fOlloWing mInor change:
MovEabLeClASs(MOveabLeClaSs&& srC) nOexcePt {
//                                 ~~~~~~~^
        cout << "move cOnStructor" << endl;
}

You Will Get the outPut:
coPy cOnStrucTOr
Move ConStrUctor
MoVe constRUctOr
mOVE cOnstructor

The noexcEpT SPeCifier teLls the STd::VeCTor impleMeNtaTion THAt it cAn saFElY apply a mOve-semANtIcS to its cOnTent. OtHeRwiSe, yOu wouLDn't hAve a stRong excePtion SAfety guarantee, WHich basically STaTES tHAt thE veCtor remains IntaCT if tHe reALlOcaTIon faIls duE tO An EXception:
§23.3.6.5 [vector.modifIeRs]/p1:

ReqUires: if an exception Is thrown otHER
  Than by thE copY CoNStructor, move coNstruCtor, assignMEnt operaTor, or Move assiGnment opeRATor
  of T or By aNy INpuTItERAtOr operation thERE are No Effects. if aN exceptIon Is tHroWn bY tHe move
  conStructor Of A nOn-coPyINsertABle T, the eFfEctS aRe uNspecIFied.

In AdditIon, tHe PuSH_baCk membeR FuNCTion WiLl Not aTteMpT to moVe-coNStrUct a new Element unLesS Its aRgUmEnt can bE bound by a non-cOnSt rvalue reFeRenCe - if noT, THen it falLs back to a copy-constructiON. If you wAnt To movE-conStruct a neW elEment bAseD On the mC instaNce in A pUsh_BACk calL, YOu NeeD tO pass in an xVALue Of mc:
vEcsourCe.push_bAck(std::move(mc));
//                  ~~~~~~~~^

Output:
mOve Constructor

EvEn wHen I INItIalIZe THe vEcTOr oBJEct with size 3 why tHe call to coPy CToR increases TO 4 foR oNe push_bAck(mc).

ThE initIAl capacIty of vecSOurce
 constructor
I am confused  by the or der h ere .
I  a m ex pect ing it 
Copy c o nstr uctor
Move constructor 
Copy  c o nstr u ct or
be cause f o rf i rst  p us h I ti ni tiali zeone siz e(copy) fo r s ec ond it reall o ca te, so mov esthe existing  me mory t onew locat ion (move ) andt he cop y the sec on d  pushi n new l o c at ion( copy)
compiler di f fe r s why..
Regard s! 

A :ve c t orisresized (s eq uentl y  grow)t od i f fer e nt memory loc ation (whic h  sh ould h av e t r iggere d mov ef orfirst push) 

st d::vector  willu tilizea  move-c onstru cto r d urin g  a  r eal lo c ati o nonl y  if  that mo ve -c onstr ucto r i s  dec lar ed w ith a  noexcept spe cif ier, orif th ere i s no  a vaila ble co py-co ns tructor (see st d::m ove_if_no exc ep t f or  more detail s): 
By  adding  the fo l low in g m in or change:
Moveabl eC l a ss (Moveabl eClass & &sr c ) noexce pt  {//                      ~~ ~~~~~^      co ut<<"Move cons tructo r" << en dl;
} 
You will gett he output:
Co p yc o ns t ruct orMove constr ucto r 
Mov e co n st ruc t or
Mo ve co ns t ru c tor

The noexcept s pe cifier  tell s the std::ve ctor imple m e n tation t hati tc an safely appl y a m ove-semant i cs to it s con tent. Ot herwise,y o u wouldn 'thav e a  st r o ng  exception sa f e ty g ua rantee,  wh ich bas ica lly  st ate sthat thevector r em ai ns  i nta ct if the real lo cat io n f ailsd ue toan ex cept io n: §23 .3.6.5[ ve c t or.m od if iers ]/p 1: 

Req uire s : I f an ex ception i s t h rown  o th er
  th an by the cop yconstructo r,  mo ve con s t ructor,assignment operator, or move as sig nment  ope rator
  o f T  or by  an y  Input Iterat or op er ati o n  ther e ar e n oeffects. I f anexcep ti on i s throw n by the move
  co n str uctor of a no n-C opyI n s er tab l eT , t he eff e c ts are unspecif ied.

In a dd i ti on, the pu s h_b ac k membe r funct ion w i ll notattempt t o move-co ns truc t a n ew element  unlessits argum e nt ca n  b e bou ndby a n on -co nst r valuer efe rence  - ifno t, the n itfa lls back  to a copy-construction . If y ou wa ntto move-c ons t ruc t a new e leme nt based o n t hemc in sta n ce in  a p u sh _ba c k cal l, y o u need to pa ssi n  a n xvalue of m c :
v ecSou rce . push_b ack( std::move(mc));
/ /                 ~ ~ ~~~ ~~~ ^ 

Ou tp ut:
Move const ruc to r 
Even wh en  I initiali ze the v ec t or ob ject w ith si ze 3 wh y th e  callto c opy  ctor inc rea se s  to 4 f or  o n e push _bac k( mc).
The in i tial c apacity of vecSo urce
 constructor
I_am confused_by the order here.
I_am expecting_it_
Copy constructor
Move_constructor
Copy_constructor
because for first_push It initialize_one size(copy) for second_it reallocate, so_moves_the existing memory to new location(move) and the copy the second push in new_location(copy)
compiler_differs why..
Regards!_

A:

vector_is_resized (sequently grow) to different_memory location (which should have_triggered move_for first push)

std::vector will utilize a move-constructor during_a_reallocation only if_that move-constructor is declared with a noexcept specifier, or_if there is no available copy-constructor_(see std::move_if_noexcept for_more_details):
By_adding the following minor_change:
MoveableClass(MoveableClass&& src) noexcept {
//  _     _      _     _    _ _    ~~~~~~~^
_  _ _  cout_<< "Move constructor" << endl;
}

You will_get the output:
Copy_constructor
Move constructor
Move constructor
Move constructor

The noexcept specifier_tells_the std::vector implementation_that_it_can safely_apply a move-semantics_to_its content._Otherwise,_you wouldn't have a strong exception_safety_guarantee, which basically states that the vector_remains intact if the_reallocation_fails due to an_exception:
§23.3.6.5 [vector.modifiers]/p1:

Requires: If an exception_is thrown other
  than by_the copy_constructor, move_constructor, assignment operator, or move assignment operator
  of T or_by any InputIterator operation there are_no effects. If an_exception is_thrown_by the move
__constructor of_a non-CopyInsertable T, the effects are unspecified.

In_addition, the_push_back member function will not attempt_to move-construct a new_element_unless its argument can be bound_by a non-const rvalue reference -_if not, then it falls_back_to_a copy-construction. If you want_to move-construct a new element based_on the mc_instance in a push_back call, you need_to_pass in an xvalue of mc:
vecSource.push_back(std::move(mc));
//__     ___    _   ~~~~~~~~^

Output:
Move constructor

Even when_I initialize the vector object with size 3 why_the call to_copy ctor increases to 4_for_one_push_back(mc).

The initial capacity of vecSource