[circular_buffer] Patch to fix two-phase name lookup issue in space_optimized

Hello Boosters, In the space_optimized circular buffer, the two calls to invalidate_iterators_except require a preceding "this->". The actual invalid_iterators_except() function is only accessible through a dependent base, so we need to make the invalid_iterators_except name dependent. The DEC compiler tried to tell us this at one point, but we ignored it. Patch is attached. - Doug

Doug Gregor escribió:
Hello Boosters,
In the space_optimized circular buffer, the two calls to invalidate_iterators_except require a preceding "this->". The actual invalid_iterators_except() function is only accessible through a dependent base, so we need to make the invalid_iterators_except name dependent. The DEC compiler tried to tell us this at one point, but we ignored it.
Patch is attached.
- Doug
# if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(70190006)) this->invalidate_iterators_except(end()); # else invalidate_iterators_except(end()); # endif Why propose that the this-> branch be a workaround? If I'm getting you, prepending this-> is standard-required and can't possibly do any harm for other compilers. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

On Tue, Apr 20, 2010 at 11:36 PM, <joaquin@tid.es> wrote:
Doug Gregor escribió:
Hello Boosters,
In the space_optimized circular buffer, the two calls to invalidate_iterators_except require a preceding "this->". The actual invalid_iterators_except() function is only accessible through a dependent base, so we need to make the invalid_iterators_except name dependent. The DEC compiler tried to tell us this at one point, but we ignored it.
Patch is attached.
- Doug
# if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(70190006)) this->invalidate_iterators_except(end()); # else invalidate_iterators_except(end()); # endif
Why propose that the this-> branch be a workaround? If I'm getting you, prepending this-> is standard-required and can't possibly do any harm for other compilers.
Perhaps you read the patch backward? The patch is changing the code to always have "this->", as is required by the standard. Before the patch, the code only provides "this->" for the DEC C++ compiler. - Doug

Hi, I have applied the patch to trunk. Will apply to release branch once the tests pass. Regards, Jan ----- Original Message ---- From: Doug Gregor <doug.gregor@gmail.com> To: boost@lists.boost.org Sent: Wed, 21 April, 2010 16:53:46 Subject: Re: [boost] [circular_buffer] Patch to fix two-phase name lookup issue in space_optimized On Tue, Apr 20, 2010 at 11:36 PM, <joaquin@tid.es> wrote:
Doug Gregor escribió:
Hello Boosters,
In the space_optimized circular buffer, the two calls to invalidate_iterators_except require a preceding "this->". The actual invalid_iterators_except() function is only accessible through a dependent base, so we need to make the invalid_iterators_except name dependent. The DEC compiler tried to tell us this at one point, but we ignored it.
Patch is attached.
- Doug
# if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(70190006)) this->invalidate_iterators_except(end()); # else invalidate_iterators_except(end()); # endif
Why propose that the this-> branch be a workaround? If I'm getting you, prepending this-> is standard-required and can't possibly do any harm for other compilers.
Perhaps you read the patch backward? The patch is changing the code to always have "this->", as is required by the standard. Before the patch, the code only provides "this->" for the DEC C++ compiler. - Doug _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Doug Gregor
-
Jan Gaspar
-
joaquin@tid.es