Re: [Boost-bugs] [Boost C++ Libraries] #4090: Macroses BOOST_PP_SEQ_FOR_EACH_*R are not reenterable

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4090: Macroses BOOST_PP_SEQ_FOR_EACH_*R are not reenterable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-17 22:53:43


#4090: Macroses BOOST_PP_SEQ_FOR_EACH_*R are not reenterable
-------------------------------+---------------------------
  Reporter: Andrey <andry@…> | Owner: no-maintainer
      Type: Bugs | Status: new
 Milestone: | Component: preprocessor
   Version: Boost 1.39.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------------

Comment (by eldiener):

 First off you are not using BOOST_PP_SEQ_FOR_EACH but
 BOOST_PP_SEQ_FOR_EACH_I. BOOST_PP_SEQ_FOR_EACH_I is not re-entrant to
 BOOST_PP_SEQ_FOR_EACH_I, for obvious reasons ( you are calling back to the
 same macro in the expansion of a macro and the C++ preprocessor is not re-
 entrant in that way ). BOOST_PP_SEQ_FOR_EACH_I is not re-entrant to
 BOOST_PP_SEQ_FOR_EACH_I_R, which is what you are doing above, because both
 share the same code for the internal BOOST_PP_FOR invocation as far as the
 pred, op, and macro code is concerned.

 The documentation for BOOST_PP_SEQ_FOR_EACH_I_R says that "It reenters
 BOOST_PP_FOR with maximum efficiency". That does not mean that it itself
 can be called from BOOST_PP_SEQ_FOR_EACH_I. It can't for the reason stated
 above.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4090#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:18 UTC