Ticket #4421: seq_split.patch

File seq_split.patch, 3.5 KB (added by Wolf Lammen <ookami1@…>, 12 years ago)
  • boost/preprocessor/seq/detail/split.hpp

    diff -dur /home/wolf/programs/boost_1_43_0/boost/preprocessor/seq/detail/split.hpp /home/wolf/workspace/booster/boost/preprocessor/seq/detail/split.hpp
    old new  
    2424#    define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n ## seq)
    2525# endif
    2626#
    27 # define BOOST_PP_SEQ_SPLIT_1(x) (x),
     27# define BOOST_PP_SEQ_SPLIT_0 BOOST_PP_EMPTY,
     28# define BOOST_PP_SEQ_SPLIT_1(x) (x) BOOST_PP_SEQ_SPLIT_0
    2829# define BOOST_PP_SEQ_SPLIT_2(x) (x) BOOST_PP_SEQ_SPLIT_1
    2930# define BOOST_PP_SEQ_SPLIT_3(x) (x) BOOST_PP_SEQ_SPLIT_2
    3031# define BOOST_PP_SEQ_SPLIT_4(x) (x) BOOST_PP_SEQ_SPLIT_3
  • boost/preprocessor/seq/first_n.hpp

    diff -dur /home/wolf/programs/boost_1_43_0/boost/preprocessor/seq/first_n.hpp /home/wolf/workspace/booster/boost/preprocessor/seq/first_n.hpp
    old new  
    1313# define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP
    1414#
    1515# include <boost/preprocessor/config/config.hpp>
    16 # include <boost/preprocessor/control/if.hpp>
     16# include <boost/preprocessor/facilities/empty.hpp>
    1717# include <boost/preprocessor/seq/detail/split.hpp>
    18 # include <boost/preprocessor/tuple/eat.hpp>
    1918# include <boost/preprocessor/tuple/elem.hpp>
    2019#
    2120# /* BOOST_PP_SEQ_FIRST_N */
    2221#
    2322# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
    24 #    define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil)))
     23#    define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_SEQ_SPLIT(n, seq BOOST_PP_EMPTY))()
    2524# else
    2625#    define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq)
    27 #    define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil)))
     26#    define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_SEQ_SPLIT(n, seq BOOST_PP_EMPTY))()
    2827# endif
    2928#
    3029# endif
  • boost/preprocessor/seq/rest_n.hpp

    diff -dur /home/wolf/programs/boost_1_43_0/boost/preprocessor/seq/rest_n.hpp /home/wolf/workspace/booster/boost/preprocessor/seq/rest_n.hpp
    old new  
    1212# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP
    1313# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP
    1414#
    15 # include <boost/preprocessor/arithmetic/inc.hpp>
    1615# include <boost/preprocessor/config/config.hpp>
    1716# include <boost/preprocessor/facilities/empty.hpp>
    1817# include <boost/preprocessor/seq/detail/split.hpp>
     
    2120# /* BOOST_PP_SEQ_REST_N */
    2221#
    2322# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
    24 #    define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))()
     23#    define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(n, seq BOOST_PP_EMPTY))()
    2524# else
    2625#    define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
    27 #    define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))()
     26#    define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(n, seq BOOST_PP_EMPTY))()
    2827# endif
    2928#
    3029# endif