
Olaf Peter schrieb:
Hi,
in my project I do have a lot of fusion adapted structures (due to use for/with spirit).
Just a note aside: starting with release 1.43 you are able to define fusion sequences in situ. If you just need public attributes in your structs, without helper functions, you can probably save some typing. See http://www.boost.org/doc/libs/1_43_0/libs/fusion/doc/html/fusion/adapted/def... for more information.
Now I want to compare them. How to reuse the informations? In the example attached, I show the (imo) complicated way using fusion::vector_tie. I would like reuse the BOOST_FUSION_ADAPT_STRUCT macro since it generates tag_of<>, struct_member<>, struct_member_name<> , struct_size<> etc.
fusion::equal_to or fusion::operator== (defined in
At http://www.boost.org/doc/libs/1_42_0/libs/fusion/doc/html/fusion/extension/e... there is the full blown feature shown how to adapt the structure for a fusion iterator. What do I really need for simple comparing? Is it the way to use? Even simpler one? [snip]
Adapting a class-type includes generation of the necessary boilerplate for iteration. In fact, there should not be any difference between one of the provided random access sequences (such as fusion::vector) and an adapted sequence. -Christopher