Subject: [Boost-bugs] [Boost C++ Libraries] #7577: base_from_member with reference types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-26 19:17:59
#7577: base_from_member with reference types
---------------------------------------------+------------------------------
Reporter: K-ballo <kaballo86@â¦> | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: utility
Version: Boost 1.52.0 | Severity: Problem
Keywords: |
---------------------------------------------+------------------------------
`base_from_member` constructors take their arguments by value, which
causes undefined behavior if the member type is a reference, as a dangling
reference is created (unless, I presume, its initialized with
`boost::ref/cref`).
The attached patch adds a partial specialization of `base_from_member` for
references. It provides a single constructor that takes its argument by
reference.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7577> 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