$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-06-13 17:16:46
> Vesa,
>
> Thanks for implementing Paul's automatic recursion technique! However, doc
> remarks like:
>
> 2D and 3D repetition
> BOOST_PP_REPEAT() implements automatic recursion. 2D and 3D repetition
> are directly supported.
>
> are just confusing if you don't already know about the problems being
> solved under-the-covers. There's no clue what "recursion" means in this
> context, for example.
>
> -Dave
I implemented an equality check as a constant time operation using the same type
of technique and emailed a sample to Vesa (the current version uses WHILE). It
basically hinges on this fact: EQUAL(x, y) ... if MACRO_y will not expand
inside MACRO_x, then x must be equal to y. Using this constant-time operation
equality check, I reimplemented TUPLE_ELEM, making the implementation
significantly easier to expand to higher values. The current implementation
uses the brute force approach:
GET_ELEM_0_FROM_TUPLE_OF_SIZE_1
GET_ELEM_0_FROM_TUPLE_OF_SIZE_2
// etc. etc.
Paul Mensonides