----- Original Message -----
From: "Joel de Guzman"
On 1/25/2010 6:54 PM, joel falcou wrote:
struct_member_name_at/at_c< index, struct_adapted_as_fusion_sequence > hmm, it's the same problem with the const char*
Is there no way to provide the member names at compile time? There must be something obvious and I am just not seeing it. name will obviously be char* and you can't have that in a template
Hicham Mouline wrote: parameter. Best shot is to generate types with name looking like member name.
I think it should just be simple functions:
template
char const* name_at_c(Sequence const& seq); template
char const* name_at(Sequence const& seq); There should be a compile error if Sequence has no named members. Some types of sequences may implement it through a customization point (same scheme that at_c and friends use).
The function argument would not be necessary, wouldn't it? All the
information is available in the type Sequence.
template