Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i know how move cons syntax for static memory allocation. but here dynamic memory allocation have tried but user define is not called. can u help me for user defined move constructor for pointer.??

What I have tried:

have tried in static memory allocation gets succeed but not let in dynamic memory allocation.
Posted
Comments
mathiv327 17-Jan-24 21:24pm    
A(const A&& a)
{
printf("a = %p,b = %p,c = %p\n", &(a.a), &(a.b), a.c);
this->b = move(a.b);
this->a = move(a.a);
this->c = move(a.c);
cout<<"Move constructor\n";
printf("a = %p,b = %p,c = %p\n", &a, &b, &c);
}
mathiv327 17-Jan-24 21:24pm    
for static memory allocation

1 solution

 
Share this answer
 
Comments
CPallini 18-Jan-24 3:05am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900