Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-13 23:10:53


Colleagues:
>

>
> When this was complete, I continued with the "concept traits" part of the
> library, where the aim was to make type traits for all the C++ standard
> concepts, as well as all the Boost.MPL concepts (for the reasons that MPL is
> widely known and used, it's part of Boost, it could help a lot with better
> error messages in such metaprogramming libraries, and as an example of
> implementing non C++ standard concepts).

You might be interested in a library I wrote during the winter called
'Metafunction Traits.'

Quoting the docs: "Metafunction Traits provides three unary boolean-valued MPL
Metafunctions for determining whether an arbitrary type is an MPL lambda
expression or model of the concept Metafunction Class. This allows metafunction
classes and lambda expressions to be used polymorphically with
non-metaprogramming types."

The library is here: http://tinyurl.com/43ddj. I didn't posted it because I
never finished writing the discussion section.

The library works on these compilers:

    * Microsoft Visual C++ 7.1
    * Metrowerks CodeWarrior 9.2
    * GCC 3.2 (MinGW)
    * GCC 3.3.1 (cygming special)
    * Intel C++ Compiler for Windows 7.1 and 8.0
    * Comeau C/C++ 4.3.3
    * Borland C++ 6.0 (preview)

It needs to be updated to reflect the new definition of nullary metafunction
class. And I should probably reimplement it to use 'local iteration', now that I
know what that is ;-)

BTW, I left out the notion of the arity of a metafunction or lambda expression
for two reasons:

1. The version which was easy to implement had slightly different semantics for
lambda expressions and metafunction classes
2. Metafunction classes can be polyadic or have undocumented trailing
parameters, so the notion of the exact arity of a metafunction class is not
really that useful

Best Regards,
Jonathan


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