Boost logo

Boost :

From: Eyal Farago (eyal.farago_at_[hidden])
Date: 2004-11-03 07:06:43


I think you're wront about this, shared_ptr should behave just like a pointer (in this aspect). it really doesn't matter if the pointer is const or not, what matters is the constness of the pointee.

typedef int* pint_t;

const pint_t p = new int(1); //p is const(same as int * const)
int &ref_to_int = *p; //but *p isn't

eyal.

-----Original Message-----
From: SourceForge.net [mailto:noreply_at_[hidden]]
Sent: Wednesday, November 03, 2004 12:29 PM
To: noreply_at_[hidden]
Subject: [boost] [Boost-bugs] [ boost-Bugs-1059388 ] shared_ptr::operator->() const return type should be const

Bugs item #1059388, was opened at 2004-11-03 13:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1059388&group_id=7586

Category: smart_ptr
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Roland (vzaznobin)
Assigned to: Peter Dimov (pdimov)
Summary: shared_ptr::operator-> () const return type should be const

Initial Comment:
shared_ptr::operator-> () const
 return type should be const

const T * operator-> () const;
T * operator-> ();

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1059388&group_id=7586

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk