From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-06-30 15:12:29
"Itay Maman" <itay_maman_at_[hidden]> wrote in message
Good work. Some short comments on the code:
* It's unfit that in the spaceship era, new Boost code has to still
define useful tools such as Int2Type, Type2Type, and Select. They
should be first-class Boost citizens.
* Stack_holder::assign is really Stack_holder::init.
* I see stack_holder has two pointers to function per object, isn't
* You say Variant-to-Variant copying is done through visitation, but
the infrastructure (Variant_to_variant_copier,
assign_variant_to_variant, Assign_helper) doesn't look like a visitor.
Actually I'm not sure I understand the copying process; isn't it
obscure and unnecessarily complex? The code dedicated to copying in my
last article on Variant is considerably shorter, basically a class
that implements a Visitor interface.
* Variant has a per-object overhead of one integer plus two pointers
to functions. Shouldn't the approach with one integer be more
I need to stop here, but by and large the implementation looks a tad
more complicated than it could be. It might be well the case that that
is because of support for incomplete types.
Also, especially when you copyright some work, it is nice to take the
time and give credit to other material (copyrighted or not, and
especially copyrighted) that served you as influence or inspiration. I
don't know if and to what extent Loki, the original Variant paper, the
article series in CUJ, or other work, served as a starting point for
your code, but if they did, it would be nice to mention them.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk