Re: [Boost-bugs] [Boost C++ Libraries] #5816: any_range requires copyable elements

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5816: any_range requires copyable elements
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-18 13:57:20


#5816: any_range requires copyable elements
-------------------------------+------------------------
  Reporter: bromeon@… | Owner: neilgroves
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: range
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+------------------------

Comment (by voivoid@…):

 This problem also prevents a use of abstract class pointers. Any chances
 this is going to be fixed?

 I wonder if the problem could be solved with something like this:
 {{{
 any_iterator_interface.hpp
 49,51c49,53
 < typedef typename remove_const<
 < typename remove_reference<Reference>::type
 < >::type reference_as_value_type;
 ---
> typedef typename mpl::if_<
> is_trivially_copy_constructible<typename
 remove_reference<Reference>::type>
> , typename remove_const<typename
 remove_reference<Reference>::type>::type
> , Reference
> >::type reference_as_value_type;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5816#comment:1>
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:14 UTC