Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-10-23 21:26:54


"David Abrahams" <dave_at_[hidden]> wrote in message
news:u7k2w2g6t.fsf_at_boost-consulting.com...
> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> > too for all similar algorithms. I know this will break the
implementation on
> > compilers without ordering of function templates
>
> Not in my experience. Are you sure?

I just seemed to remember problems while doing the container_traits. But
this seems to
compile fine on vc6:

#include <vector>
#include <iostream>

using namespace std;

template< typename C >
void foo( C& c )
{
    cout << "nonconst";
}

template< typename C >
void foo( const C& c )
{
    cout << "const";
}

int main()
{
    vector<int> v;
    foo( v );
}

so I must be wrong.

Thorsten


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