Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-08-12 14:09:16


"David Abrahams" <dave_at_[hidden]> wrote in message news:ullgkdxb0.fsf_at_boost-consulting.com...
| "Thorsten Ottosen" <nesotto_at_[hidden]> writes:

[snip]

| > exactly. this at least one benefit of using namespace + _of postfix over prefixing with range_. If the namespace is hidiously
long,
| > the user can remove it or shorten it.
| >
| > but I would like to hear more voices on this issue :-)
|
| boost::iterators::value<I>::type
| boost::iterators::reference<I>::type
|
| boost::ranges::value<R>::type
|
| and so forth?

good idea to rename value_type<I>::type value<T>::type :-)
I guess we should do that with

range::size<R>::type
range::difference<R>::type

too. but then what happens when I have a function called size()? I guess the namespace will protect against clashes, ie,

namespace range
{

    template< class T >
    struct size
    {
      typedef T type;
    };

}

template< class T >
typename range::size<T>::type size( const T& r )
{

}

should work..

br

-Thorsten


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