[C++-sig] Re: difficulty with has_back_reference example
dave at boost-consulting.com
Sun Jul 18 17:58:21 CEST 2004
Jonathan Brandmeyer <jbrandmeyer at earthlink.net> writes:
> On Sat, 2004-07-17 at 15:21, David Abrahams wrote:
>> David Abrahams <dave at boost-consulting.com> writes:
>> > See libs/python/test/back_reference.cpp in your boost distribution,
>> > which does compile. Would you mind posting a patch to correct the
>> > documentation (or just checking in the fix once you know what it is
>> > if you have checkin privs)?
>> The problem is that has_back_reference<T> needs to be a metafunction.
> Thanks for the diagnosis. Rather than raise the requirement of
> has_back_reference<T> from being a traits class to a predicate
> metafunction, would you accept the following patch? It basically
> performs a metacast from a predicate traits struct to a metafuction. I
> will be happy to apply the right patches in either case.
I'm afraid not. I'm actually in the process or reworking and
cleaning up that whole area of the code. The metafunction protocol
is the emergent Boost standard; has_back_reference doesn't need to
inherit from mpl::bool_<x>, but it does need to have a nested ::type
with a nested ::value.
More information about the Cplusplus-sig