Subject: [Boost-bugs] [Boost C++ Libraries] #13340: ptr_vector::c_array is not compiling when boost::nullable is used.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-14 10:15:13
#13340: ptr_vector::c_array is not compiling when boost::nullable is used.
------------------------------+------------------------------
Reporter: przemek.wos@⦠| Owner: Thorsten Ottosen
Type: Bugs | Status: new
Milestone: To Be Determined | Component: ptr_container
Version: Boost 1.62.0 | Severity: Problem
Keywords: |
------------------------------+------------------------------
Hi,
Using c_array() when nullable is in interface, triggers compile error.
Fallowing code is not compiling.
{{{
boost::ptr_vector<boost::nullable<int>> p;
p.c_array(); //compile error
}}}
It looks like inside c_array reinterpret_cast should to {{{value_type*}}}
not {{{T**}}}.
{{{
T** res = reinterpret_cast<T**>( &this->begin().base()[0] );
}}}
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13340> 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-12-14 10:21:53 UTC