Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52361 - trunk/boost/mpl
From: eric_at_[hidden]
Date: 2009-04-12 19:07:40


Author: eric_niebler
Date: 2009-04-12 19:07:37 EDT (Sun, 12 Apr 2009)
New Revision: 52361
URL: http://svn.boost.org/trac/boost/changeset/52361

Log:
saving some additional template instantiations
Text files modified:
   trunk/boost/mpl/string.hpp | 16 +++++-----------
   1 files changed, 5 insertions(+), 11 deletions(-)

Modified: trunk/boost/mpl/string.hpp
==============================================================================
--- trunk/boost/mpl/string.hpp (original)
+++ trunk/boost/mpl/string.hpp 2009-04-12 19:07:37 EDT (Sun, 12 Apr 2009)
@@ -390,31 +390,25 @@
     template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, unsigned C), unsigned J> \
     struct string_iterator<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, n, J> \
     { \
+ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) }; \
         typedef mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)> string; \
         typedef std::bidirectional_iterator_tag category; \
         typedef \
- typename mpl::if_c< \
- (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) \
- , mpl::string_iterator<string, n + 1, 0> \
- , mpl::string_iterator<string, n, J + 1> \
- >::type \
+ mpl::string_iterator<string, n + eomc_, eomc_ ? 0 : J + 1> \
         next; \
         typedef \
- mpl::string_iterator<string, n, J-1> \
+ mpl::string_iterator<string, n, J - 1> \
         prior; \
         typedef mpl::char_<BOOST_MPL_MULTICHAR_AT(BOOST_PP_CAT(C, n), J)> type; \
     }; \
     template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, unsigned C)> \
     struct string_iterator<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, n, 0> \
     { \
+ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) }; \
         typedef mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)> string; \
         typedef std::bidirectional_iterator_tag category; \
         typedef \
- typename mpl::if_c< \
- (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) \
- , mpl::string_iterator<string, n + 1, 0> \
- , mpl::string_iterator<string, n, 1> \
- >::type \
+ mpl::string_iterator<string, n + eomc_, !eomc_> \
         next; \
         typedef \
             mpl::string_iterator< \


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