Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-09-05 13:38:44


Eric Niebler <eric <at> boost-consulting.com> writes:

>
> Thorsten Ottosen wrote:
> > "Eric Niebler" <eric <at> boost-consulting.com> wrote in message
> >>
> >>OK, but if we want the Range concepts fixed for 1.33.1 (we do, right?)
> >>then we have a bit of time pressure.
> >
> >
> > When you say fixing the concept, then I assume don't just mean the
> > documentation?
> > If the change turns out to require refactoring of the implementation, then
> > it might be
> > risky to rush into something.
> >
>
> I'm talking about the documentation. For the point release, I think it's
> very important that the documentation is an accurate reflection of the
> code,

right. I have been reading up on the old threads and also looked in the
code. I had forgotten about the fact, that I already had implemented
the ADL hooks.

I'm sorry about the confusion my memory (or lack thereof) has brought.

> and that some mention is made of the customization hooks
> (boost_range_begin() et al.). In addition to cleaning up the concepts
> specifications, the section on extending boost.range should say
> something about the ADL customization points.

I agree.

> After the point release, I plan on taking a deeper look at the
> extensibility mechanism to see if it works on the broken compilers that
> boost supports. Also, I notice there is no Range test for the
> boost_range_* ADL hooks. That needs to be addressed as well.

Also right.

I'll work on it for a little time now and then I'll commit something
to the RC_XX branch. I hope you will give some feedback on it then.

As fot the wg21 proposal, then this is certainly a thorny issue.

I can think of these two sources that can be important to the proposal:

http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_active.html#218

and

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1792.pdf

If I understand Sutter's proposal correct, no
namespaces of template arguments will be considered. This would
make the problem which caused multi_index_container to break in
FOREACH. So, for example,

namespace boost
{
        namespace mpl
        {
                struct end
                { };

                struct foo
                { };
        }

        template< class T >
        int end( T t )
        { return 0; }

}

template< class T >
struct bar
{ };

int main()
{
        using boost::end;
        bar<boost::mpl::foo> f;

        return end(f);
}

will now (in Sutter's wording) disregard the namespace boost::mpl::foo.
(Of course we cannot rely on this currently, and it is of course
not sure we can rely on it for C++0x either).

Thanks for straightening this out.

best regards

Thorsten

 


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