Subject: Re: [boost] [rpc] Introducing Boost.Reflect, Boost.CMT, and Boost.RPC
From: Julien Nitard (julien.nitard_at_[hidden])
Date: 2011-08-03 07:02:19


Hi Daniel,

Some more input on my usage of boost::reflect:

- Annoying warning in reflect.hpp line 84 (multi-line comment), triggered
because there's a back slash at the end of a single line comment. Removing
the back slash or the line solves the problem. (I use -Wall).

- Additional facility to recurse:
There are two cases where I think boost::reflect could add interesting
functionality when visiting a type, for other types that are themselves
reflected and for arrays.
I wrote a visitor that converts the endianness of a reflected struct. When
I browse an object, if the member is an array then I write special logic to
apply the correction on array members and on members that are themselves
reflected. In that special case I print a compilation error when a member's
type is not reflected. A sample code is attached.
I did something similar in my CSV visitor to output member arrays as Col1
Col2 ... ColX (with an exception for char[] that is printed as a string).

- Remove the const in operator()
The above example has a good reason to modify the data while recursing, that
made declare my target object has mutable which I think is awkward. There
could be two constructors to visitor one taking a const object and one
taking a non-const object to keep the maximum const correctness when
possible.

Thanks for the hard work,

Regards,

Julien