Re: [Boost-bugs] [Boost C++ Libraries] #3123: Support for serializing shared_ptr to const types

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3123: Support for serializing shared_ptr to const types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-26 15:55:33


#3123: Support for serializing shared_ptr to const types
---------------------------+------------------------------------------------
  Reporter: sohail | Owner: ramey
      Type: Bugs | Status: reopened
 Milestone: Boost 1.40.0 | Component: serialization
   Version: Boost 1.39.0 | Severity: Regression
Resolution: | Keywords:
---------------------------+------------------------------------------------

Comment(by sohail):

 Replying to [comment:1 ramey]:

 Fixing formatting.

 I have to disagree with you here. We are not touching a const object at
 all. The shared_ptr itself is non-const.

 {{{
 T *p; // p is non-const
 T const *p; // p is still non-const
 }}}

 {{{
 shared_ptr<T> p; // p is non-const
 shared_ptr<const T> p; // p is still non-const
 }}}

 So what is the problem? I don't need a const-cast to mutate p in either
 case. This to me is a deficiency in the library not the user!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3123#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC