473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Doubt with auto_ptr_ref

CID
Hello all,

I was reading about auto_ptr from TC++PL. It tells, the purpose of
auto_ptr_ref is to implement the destructive copy semantics for
ordinary auto_ptrs.

Can somebody there please explain how it achives the requirement ? I am
interested to know how auto_ptr_ref helps in transferring ownership and
how it avoids copying of const auto_ptrs.

Any help will be appreciated.
Thanks and Regards
CID

Jul 23 '05 #1
1 1301
CID wrote:
Hello all,

I was reading about auto_ptr from TC++PL. It tells, the purpose of
auto_ptr_ref is to implement the destructive copy semantics for
ordinary auto_ptrs.

Can somebody there please explain how it achives the requirement ?
It doesn't. The references cited here explain how it was supposed to work and
why it's broken:

http://www.kangaroologic.com/move_ptr/
I
am interested to know how auto_ptr_ref helps in transferring
ownership and how it avoids copying of const auto_ptrs.


Jonathan
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Neelesh Bodas | last post by:
Hello All, My question is regarding the implementation of auto pointers - How does the class auto_ptr_ref work? eg: suppose I have : auto_ptr<int> foo(); int bar() {
77
by: muttaa | last post by:
Hello all, My doubt is going to be so primitive that i ask you all to forgive me beforehand.... Here's the code snippet: int main() { int x=5;
11
by: Bob Nelson | last post by:
I don't remember seeing the term ``doubt'' used much in c.l.c. back in the 90's. When did this word become nearly synonymous with ``question'' or ``query'' and does it have static duration?
9
by: dragoncoder | last post by:
Hi all, I am trying to understand the auto_ptr_ref role in the implementation of auto_ptr<>. I read the information on net but still not 100% sure of it. My plan is as follows. 1. To see the...
122
by: ivan | last post by:
hi all, if I have: if(A && B || C) which operation gets executed first? If I remeber well should be &&, am I correct? thanks
1
by: digz | last post by:
Hi, The std::auto_ptr 14.4.2 in Stroustrup ,the book talks about "std::auto_pt_ref is to implement destructive copy semantics" , after some more search I found that auto_ptr can be returned from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.