Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-06-18 00:02:10


Hi,

I am having problems with subject test with Metrowerks compiler. I was able
to minimize the issue to the following snippet:
#include <list>
#include <iostream>

template<typename T>
inline void
print( std::ostream& ostr, T const& t, long ) { ostr << t; }

template<typename T>
inline void
moo( std::ostream& ostr, T const& t ) { print( ostr, t, 0 ); }

inline void
print( std::ostream& ostr, std::list<int> const& t, int ) {}

void foo()
{
    std::list<int> lst;

    print( std::cout, lst, 0 ); //1
    moo( std::cout, lst ); //2
}

Line 1 compile successfully, while line 2 chokes.

Any Ideas?

Gennadiy.

P.S. Rest of Windows compilers I have access to seems to be happy with
above.


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