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


-----Original Message-----
From: [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:

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:

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.
Boost-bugs mailing list
Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at