|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65120 - trunk/boost/preprocessor/seq
From: steven_at_[hidden]
Date: 2010-08-29 22:26:03
Author: steven_watanabe
Date: 2010-08-29 22:26:02 EDT (Sun, 29 Aug 2010)
New Revision: 65120
URL: http://svn.boost.org/trac/boost/changeset/65120
Log:
Avoid evaluating BOOST_PP_SEQ_HEAD when it isn't needed. Fixes #4465.
Text files modified:
trunk/boost/preprocessor/seq/cat.hpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Modified: trunk/boost/preprocessor/seq/cat.hpp
==============================================================================
--- trunk/boost/preprocessor/seq/cat.hpp (original)
+++ trunk/boost/preprocessor/seq/cat.hpp 2010-08-29 22:26:02 EDT (Sun, 29 Aug 2010)
@@ -26,7 +26,7 @@
BOOST_PP_IF( \
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
BOOST_PP_SEQ_CAT_I, \
- BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_1 \
+ BOOST_PP_SEQ_HEAD \
)(seq) \
/**/
# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
@@ -39,10 +39,11 @@
# define BOOST_PP_SEQ_CAT_S(s, seq) \
BOOST_PP_IF( \
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
- BOOST_PP_SEQ_CAT_S_I, \
- BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_2 \
+ BOOST_PP_SEQ_CAT_S_I_A, \
+ BOOST_PP_SEQ_CAT_S_I_B \
)(s, seq) \
/**/
-# define BOOST_PP_SEQ_CAT_S_I(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
+# define BOOST_PP_SEQ_CAT_S_I_A(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
+# define BOOST_PP_SEQ_CAT_S_I_B(s, seq) BOOST_PP_SEQ_HEAD(seq)
#
# endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk