[C++-sig] Re: Auto-Generation and BPL v2

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Fri Nov 8 22:49:55 CET 2002


--- David Abrahams <dave at boost-consulting.com> wrote:
> Wow, it's just another C++ layer on top of Boost.Python? That is
> pretty cool!

My suggestions are based on the naive assumption that the "configuration code"
has to conform to the C++ syntax, but is not actually used by the C++ compiler
(even #ifdef'ed out?). IIUC Cable reuses the C++ parser, but then has its own
machinery for interpreting the abstract syntax tree (XML representation). The
syntax is identical, but the semantics in namespace "_cable_" or "wrappers" are
Cable-specific. Brad, is this correct?

> >     namespace cable {
> >       template <typename T> void wrap(T) {}
> >     }
> >     
> >     namespace wrappers
> >     {
> >       // to specify that they should all be called "f_int"
> >       void f_int()
> >       {
> >         cable::wrap(f<int, char>);
> >         cable::wrap(f<int, float>);
> >       }
> >
> >       // or alternatively
> >       void f_int_double()
> >       {
> >         cable::wrap(f<int, double>);
> >       }
> >     }

This idea is obsolete if my assumption above is not correct. If my assumption
is correct I see a whole new universe of possibilities in front of us.

Ralf


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2




More information about the Cplusplus-sig mailing list