Re: [Boost-bugs] [Boost C++ Libraries] #4174: Patch to fix auto_ptr usage errors in ptr_container tests

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4174: Patch to fix auto_ptr usage errors in ptr_container tests
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-01 00:13:06


#4174: Patch to fix auto_ptr usage errors in ptr_container tests
--------------------------------------+-------------------------------------
  Reporter: dgregor | Owner: nesotto
      Type: Patches | Status: closed
 Milestone: Boost 1.43.0 | Component: ptr_container
   Version: Boost Development Trunk | Severity: Problem
Resolution: fixed | Keywords:
--------------------------------------+-------------------------------------
Changes (by dgregor):

  * status: new => closed
  * resolution: => fixed

Comment:

 (In [61718]) At several places in the ptr_container tests, we have the
 following pattern:

 void f(const std::auto_ptr<int> &); void g() {

 f(std::auto_ptr<int>(new int(5)));

 }

 This is code is ill-formed in C++98/03, because the compiler is
 required to check there there exits a copy constructor that would be
 able to make a copy of the auto_ptr before binding it to a reference,
 even if that copy won't actually be made. Not all compilers diagnose
 this error, but Clang and EDG in strict mode do diagnose the problem.

 Fixes #4174.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4174#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:03 UTC