From 2b9fee0cff63bf5075cdee105b9c8e11adb69f64 Mon Sep 17 00:00:00 2001
From: Vesa Karvonen Both of the above lists contain 5 elements: 1, 2, 3, 4 and 5. Longer lists can be built with the help of BOOST_PP_LIST_APPEND(). Longer lists can be built from short lists with BOOST_PP_LIST_APPEND_D()
+and BOOST_PP_LIST_FOLD_RIGHT_2ND():
+ BOOST_PP_LIST_FOLD_RIGHT_2ND
+ ( BOOST_PP_LIST_APPEND_D
+ , BOOST_PP_TUPLE_TO_LIST
+ ( N
+ , BOOST_PP_TUPLE_TO_LIST(M, (E11, E12, ..., E1M) )
+ , BOOST_PP_TUPLE_TO_LIST(M, (E21, E22, ..., E2M) )
+ , ...
+ , BOOST_PP_TUPLE_TO_LIST(M, (EN1, EN2, ..., ENM) )
+ )
+ )
+
diff --git a/include/boost/preprocessor/list/adt.hpp b/include/boost/preprocessor/list/adt.hpp
index 5efaee2..9fbc580 100644
--- a/include/boost/preprocessor/list/adt.hpp
+++ b/include/boost/preprocessor/list/adt.hpp
@@ -48,7 +48,21 @@ BOOST_PP_LIST_CONS(). For example,
Both of the above lists contain 5 elements: 1, 2, 3, 4 and 5.
-Longer lists can be built with the help of BOOST_PP_LIST_APPEND().
+Longer lists can be built from short lists with BOOST_PP_LIST_APPEND_D() +and BOOST_PP_LIST_FOLD_RIGHT_2ND():
+ ++ BOOST_PP_LIST_FOLD_RIGHT_2ND + ( BOOST_PP_LIST_APPEND_D + , BOOST_PP_TUPLE_TO_LIST + ( N + , BOOST_PP_TUPLE_TO_LIST(M, (E11, E12, ..., E1M) ) + , BOOST_PP_TUPLE_TO_LIST(M, (E21, E22, ..., E2M) ) + , ... + , BOOST_PP_TUPLE_TO_LIST(M, (EN1, EN2, ..., ENM) ) + ) + ) +*/ #define BOOST_PP_LIST_CONS(H,T) (H,T,1)