Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-28 00:09:22


AMDG

Eric Niebler wrote:
>> - I would be *very* interested to see what Proto would look like
>> under ConceptGCC -- nobody really seems to understand the
>> interaction of DSELs and metaprogramming with concepts,
>> AFAICT. Have you thought about it?
>>
>
> I haven't. You're the second person to ask me that. The first was Gary
> Powell, and it's a topic that has him deeply concerned. He feels there
> may be some inherent incompatibilities between the necessarily(?)
> unconstrained system of templates that libraries like Lambda seem to
> require and the constrained templates that people are likely to write in
> the future. It's an open question. I don't have the concept-foo yet to
> answer it myself.
>

I tried to see about implementing mpl::apply using concepts,
last May at BoostCon07. I quickly concluded that ConceptGCC
was not able to handle such uses yet, and gave up.

My guess is that the best we will be able to do is to create
a concept that takes it's best shot at checking--for the sake of
users, and then internally use late_check everywhere.

Even then, lambda will be really hard. We would like to give
a meaningful error message when someone tries to call a lambda
function with incompatible parameters. Unfortunately, the easy way
to do this--via a recursive concept that walks through all subexpressions,
will give a message like:

Error: could not find concept_map for
LambdaFunctorApply<lambda_functor<lambda_functor_base</*Lot's more...*/>
>, /*argument types*/>

Which is hardly more helpful than the current error messages.
For those who can actually understand template error messages
it will in fact be less helpful, because it's missing critical information.

What I'd really like to see is a way to get a two-level message.
at both the boudaries between lambda and the rest of the world,
somehow skipping the lambda internals.

In Christ,
Steven Watanabe


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