Boost logo

Boost Users :

From: craigp (craigp98072_at_[hidden])
Date: 2006-12-11 05:01:18


i've been looking at the fusion library for a few days now, and i feel like i'm
missing something (or just trying to make this fit for a use-case it's simply
not suited for). i'm looking as using it for compile-time introspection for,
let's say, serialization. one thing i was curious about was whether i can
statically map each of my persistent types to a string (which could be used as
the name of an xml element/attribute). i quickly determined that a map (of
fusion-pairs) with more than just a few elements quickly overwhelms the
compiler (msvc 7.1; raising the limit of 20 to ~50 just makes the compiler
barf).

any thoughts on this? fusion provides what appears to be a lot of
infrastructure, but i can't seem to take advantage of most of it ('out of the
box', anyway). the best i've come up with so far is to create a for_each_it
algorithm which, instead of calling back the visitor function with the value,
calls it back with the corresponding iterator instead. this seems to work ok,
but it appears i'd need to hand-write each algorithm (as well as each
sequence), and i don't think that's how it was intended to be used. ;-)

any thoughts? am i just barking up the wrong tree? what kinds of
applications/use-cases were in mind when fusion was designed? most things i've
thought of would (i'd guess) be impractical with today's compilers. i think
there's some connection with fusion and spirit... how does spirit avoid the
compiler limits i seem to run into?

thanks!
--craig

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net