Boost logo

Boost :

Subject: Re: [boost] Compile time reflection for IPC using
From: Oleg Labutin (ol.labutin_at_[hidden])
Date: 2014-01-18 12:06:21


Thanks.
    But I see many attempts to resolve this problem in boost::fusion e.g.
But it approch can't resolve problem different scope for fields
Like FIELDS((int) _1, (char) _2) my_struct; but not struct my_struct {
FILD(int, _1); METH(int, call_1, (int, char)); ... METH(... call_N ...) };
Therefore I think this question is actual now in context boost.
Because in approcah I sent we can collect any meta information compile
time. And I canm say it is not only compile time reflection This is very
comfortable approaches to designe.

like

struct rule_on_1_case
{
    struct roles { struct on_begin_1_case; struct on_end_2_case; };
};

REGISTER_RULE(rule_on_1_case);

struct rule_on_2_case
{
    struct roles { struct on_begin_2_case; struct on_end_1_case; };
};

REGISTER_RULE(rule_on_2_case);

.... N rules, or anythink in different scope

After which we can collect all types

typedef typename
   hl::manual_extrcat<rules>::type rules_typelist;
// boost::v_item<rule_on_1_case, boost::v_item<rule_on_2_case,
boost::mpl::na, 0>, 0>

And do somethink .
Compile time reflection it is only one case when this approcah can be used

2014/1/18 Bjorn Reese <breese_at_[hidden]>

> On 01/17/2014 08:10 AM, Oleg Labutin wrote:
>
>> Do you now about one approach (for two compilers (gcc 3.7, and MSVC
>> (last)) emulate compile time reflection with difference scope?
>>
>
> Compile-time reflection is currently being investigated by SG7
> (the C++ standardization workgroup for reflection)
>
> http://isocpp.org/std/the-committee
> https://groups.google.com/a/isocpp.org/forum/#!forum/reflection
>
> _______________________________________________
> 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