Re: [Boost-bugs] [Boost C++ Libraries] #7577: base_from_member with reference types

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7577: base_from_member with reference types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-05 17:58:57


#7577: base_from_member with reference types
----------------------------------------------+-----------------------------
  Reporter: K-ballo <kaballo86@…> | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: utility
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------------+-----------------------------

Comment (by kaballo86@…):

 I could tell you more about the specific use cases, but I think you are
 missing the point. When instantiating a `base_from_member` with a
 reference type the member will contain a dangling reference. There is no
 error, no warning, no assertion; only a crash at runtime if you are lucky
 enough.

 A reference `base_from_member` cannot be properly initialized (I even
 failed to get it working by using `boost::ref/cref`). If my fix is
 rejected, then at least there should be an assert or a big bold note in
 `base_from_member` documentation saying that `base_from_member` cannot be
 used with reference types. That is unless you could tell me how would I
 properly initialize a `base_from_member` instantiated with a reference
 type.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7577#comment:4>
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:11 UTC