Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-06-20 18:03:49


Hi Boosters,

here is my review summary so far, in form of a TODO list and sketches how the
next generation interface will look like. I hope I did not forget anything
important.

I used 'pof' (plain old functional, inspired by 'pod') in the naming to refer to
what was previously called "function types".

Not sure this - and the names in general - are good (pof gives a fine namespace
name, though).

Comments are welcome, of course!

Thanks,

Tobias

Documentation:
--------------

- revise text in respect to the reviewer's notes
- inline examples, add short examples of typical use cases
- add a tutorial
- port to BoostBook on the fly

Library:
--------

- wrap interface in namespace, shorten/improve identifier names
- cv-qualify class types of member function pointer
- add unary (TypeTraits-style) traits for classification for most common cases
- decorate member function pointers' class type in 'signature' with a reference
   by default
- allow a placeholder name in calling conventions configuration to allow
   "explicitly empty" cc-attributation to address MSVC's '__thiscall' which
   cannot be specified explicity.
- tag becomes the second (template-) parameter for tag-based metafunctions
- improve tag logic by allowing combination of orthogonal aspects
- simplify 'signature' by hiding most type members

Synopsis (draft):
-----------------

(lazy notation, all are class templates)

     // Classification
     is_function_
     is_function_pointer
     is_function_reference
     is_member_function_pointer_

     is_pof // true if one of the above is true
     is_unbound_pof // like is_pof but excludes member function pointers

     is<Tag_Or_Function_Or_Signature,Tag> // previously name: is_function_type

     // Decomposition
     arity // number of parameters of the function
     parameter[_c] // get a single parameter type
     class_ // class type of member function pointers (undecorated)

     parameters // MPL sequence of paramters
     signature<POF, ClassDecoration = add_reference<_> > // Seq. with all types

     effective_parameter[s/_c] // includes "this reference" (hard-wired)

     // Synthesis
     pof_type<Signature_or_Seq_or_POF // previous name: function_type (*1)
             ,Tag = unspecified,ClassDecoration = add_reference<_> >

     tag[_n]<Signature_or_Seq_or_POF // combined tag (*2)
        ,Tag1 [[= nil_t], Tag2 = [[nil_t], ...]] >

(*1)
   tag< signature<T> >
replaces
   typename function_type_signature<T>::kind

(*2)
   pof_type< signature<T> >
replaces
   typename function_type_signature<T>::representee


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