Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3996: Enable use of BOOST_FOREACH over const-ref of noncopyable ptr_containers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-25 00:20:41
#3996: Enable use of BOOST_FOREACH over const-ref of noncopyable ptr_containers
--------------------------------------------------------+-------------------
Reporter: Kazutoshi Satoda <k_satoda@â¦> | Owner: nesotto
Type: Patches | Status: new
Milestone: Boost 1.43.0 | Component: ptr_container
Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords: BOOST_FOREACH is_noncopyable
--------------------------------------------------------+-------------------
Comment (by Kazutoshi Satoda <k_satoda@â¦>):
Replying to [comment:2 eric_niebler]:
> ... and will lead to ODR violations when different translation units see
different specializations of foreach::is_noncopyable.
How different specializations of foreach::is_noncopyable<> can be seen
for a !ValueType which is required to be complete for the instantiation
of foreach::is_noncopyable<!ValueType> in my patch?
I can imagine a case where the specialization of
foreach::is_noncopyable<!ValueType> is provided in a separate header
from one which defines !ValueType. But in such case, the problem is in
!ValueType; the same problem can be caused without my patch.
> Instead, define a partial specialization of foreach::is_noncopyable<
reversible_ptr_container<...> >
Providing a specialization of foreach::is_noncopyable<> for a base class
isn't propagated to derived classes (ptr_vector<...>, ptr_list<...>, ...
in this case). With that approach, duplicated definitions of
specialization would be required. I think it's hardly acceptable,
especially thinking users can define their own ptr_container using
reversible_ptr_container<>.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3996#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:03 UTC