New O(N*N) space and O(1) time BOOST_PP_TUPLE_ELEM()

[SVN r14150]
This commit is contained in:
Vesa Karvonen
2002-06-16 08:08:00 +00:00
parent 8854c2c573
commit cbe5e0fa9f
2 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@
#include <boost/preprocessor/dec.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/empty.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
/* The time complexity of DELAY(N) is O(pow(2,N)).
*
@ -31,7 +32,7 @@
*/
#ifndef DELAY_MAX
#define DELAY_MAX 16
#define DELAY_MAX 15
#endif
#define DELAY(N) BOOST_PP_TUPLE_ELEM(2,0,(BOOST_PP_EMPTY,BOOST_PP_WHILE(DELAY_C,BOOST_PP_CAT(DELAY_F,N),BOOST_PP_DEC(N))))()

View File

@ -16,6 +16,7 @@
#include <boost/preprocessor/expr_if.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <libs/preprocessor/test/test.hpp>