Boost logo

Boost :

Subject: Re: [boost] [rpc] Introducing Boost.Reflect, Boost.CMT, and Boost.RPC
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2011-07-29 09:48:36


On Jul 29, 2011, at 3:22 AM, Julien Nitard wrote:

> Hi,
>
> I am quite interested by boost::reflect : I have a few csv exports of
> existing structures to do, it sounds like the right tool (even though it can
> apparently do much more). So far it's the smallest effort to reflect
> existing data structures (no need to specify the types of members).

Great to hear, that is actually my primary goal with boost reflect, minimize extra typing.

>
> I got "a" version (the "master" branch) from github and I tried the sample
> from http://bytemaster.github.com/dev/group__boost__reflect__quickstart.html
> but
> I had to change a few things from the code to make it work:
>
> - vtable.hpp line 47 vtable<T, InterfaceDelegate> ---> vtable<Visitor,
> InterfaceDelegate>

vtable.hpp line 47 should never actually be instantiated unless you attempt to use it with
a type that has not had the BOOST_REFLECT_ANY() macro specified for it. That said, the
correct fix is vtable<InterfaceType,InterfaceDelegate>. I had changed the template parameter
to be more descriptive for documentation purposes and missed that.

> - xml_printer::operator() must be const, it is not in the sample

You are correct, documentation error. It has been updated.

> - you must use the "xml_printer" functor by explicitely specifying the
> template argument (xml_printer<my_struct>(t) instead of xml_printer(t)).

Also correct. I have updated the example to reflect that and added a new helper to the example that
should simplify things. xml_printer::make( t ) will deduce the type for you, useful if t is complex.

> I am using gcc 4.5.2 under Ubuntu in case that matters.
>
Thanks for all of your input, changes have been checked into git and documentation updated.

I have only tested on Mac OS X with gcc 4.5 and 4.2.1, limited testing on Windows. I suspect that Boost.Context will need a small
CMake change to link the proper asm. On Windows you have to use the nmake build because a cmake
bug prevents it from compiling the Boost.Context asm with the VS generators.

More documentation is coming.

>
> Regards,
>
> Julien
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk