Re: [Boost-bugs] [Boost C++ Libraries] #10853: problem with detection of const_cast_from

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10853: problem with detection of const_cast_from
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-06 19:09:28


#10853: problem with detection of const_cast_from
------------------------------------+------------------------
  Reporter: Matei David <matei@…> | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: intrusive
   Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------+------------------------

Comment (by igaztanaga):

 const_cast_from must be a template because you can't only const_cast from
 a pointer to a const object but also from a non-const volatile object,
 const_cast also works for expressions that only remove volatile, etc.

 I agree that list::front() does not need to use const_cast_from but this
 expression:

 int *p = 0;
 const_cast<int*>(p);

 is valid, and const_cast_from tried to emulate all this permitted
 behaviour (specially to support some generic code where pointers passed as
 argumnets could be non-const-qualified.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10853#comment:2>
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:17 UTC