From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-07-18 21:27:35
I've started to read "Boost C++ Metaprogramming Library" paper. It's really
very interesting. Sadly, I did not read it before.
I have couple questions:
Page 4 1.2.3 : "The structure destrubed by types ...". Did you mean
Page 5 1.2.3 : In example 1, third comments. Did you mean <=?
Page 6 1.3 : It seems that all_permutation could be implemented shorter,
something like this (not tested!)
// return an array of the N! permutations of x
template< typename T >
wrapper< typename permutation_holder<T>::type >
all_permutations(T const& in)
wrapper<typename permutation_holder<T>::type> result;
unsigned const N = sizeof(T) / sizeof(**result.x);
unsigned const result_size = sizeof(result.x) / sizeof(T);
T* src = ∈ // (or &&*in?)
for( T* dst = result.x; dst != result.x + result_size; ++dst )
std::copy(*src, *src + N, *dst);
std::next_permutation(*dst, *dst + N);
src = dst;
Page 8 2.1 : Does introduction of mpl::if_ mean that we gonna depricate
Page 11 2.1.1 : At the end You discussing the way how to eliminate
instantiation of boost::remove_pointer. The price for it instantiation of
mpl::identity. You did not mention it.
Page 15 2.2.5. Here you first mention type _1 without any qualifier. Would
not it cause an ambigility if used simultaniously with boost::lambda or
boost::bind facility. In general don't you think we have to much _1 all over
Page 16 2.3.3 : You mention Sequence concepts without defining what are
they. At least link would be good.
Page 16 2.3.3 : You introduced tiny_list. I did not get why is it Sequece at
all. It does not fit to Sequence definition. Also what is
tiny_list_iterator<T,0>::prior (and why not prev?)? Would not it cause
indefinite instantiation. Later you sad that tiny_list model Bidirectional
sequence, what is unclear without concept definition.
P.S. BTW user is he or she in english?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk