Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-03-24 13:20:06


"David Abrahams" <dave_at_[hidden]> wrote in message
news:u64zhuf0x.fsf_at_boost-consulting.com...
| "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
|
| > "Pavol Droba" <droba_at_[hidden]> wrote in message
| > news:20050324164342.GD15682_at_lenin.felcer.sk...
| >
| > So why not stick to the simple range_begin() ?
| > |
| > | I might be missing something?
| >
| > range_size() will clash with range_size>T>::type
|
| ...on GCC that uses an overly liberal interpretation of ADL and seems
| unlikely to change it anytime soon.

hm...does this compile on your compiler:

int range_size( int )
{
    return 0;
}

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

template< class T >
typename range_size<T>::type size( T t )
{
    return range_size( t );
}

int main()
{
    return size( 0 );

}

-Thorsten


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