Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2005-05-11 07:32:50


Jonathan Turkanis wrote:
> Daniel Wallin wrote:
>
>>Jonathan Turkanis wrote:
>>[...]
>>
>>>Yes, I'm interested. I'm pretty comfortable implementing the current
>>>feature set with above syntax. I'd certainly be interested in you
>>>ideas about extensibility, however.
>>
>>Here's some PP-code that allows a pretty optimal syntax.
>
>
> Thanks, Daniel! I wasn't sure how to handle cv-qualifiers, and so was pretty
> much resigned to using CONST_FN or something like that, and ignoring volatile in
> the macro-based IDL.
>
> One thing that remains is to figure out how to handle base interface lists and
> member typedefs. Any suggestions would be very welcome.

How about:

  INTERFACE(
      Base1
    , ...
  );

  INTERFACE(
      (Derived, (Base1)(Base2)(..))
    , ...
  );

For base lists? And I believe this can work for typedef's on gcc:

  INTERFACE(
      MyInterface
    , ((ostream&)(int) const)
      ((char)(float))
      typedef (int, my_type)
      typedef (float, my_float)
  );

Again, I don't know how portable these things are. Maybe a PP guru could
give us a verdict.

-- 
Daniel Wallin

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