Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2000-11-12 22:23:12

For some reason, my cross-version constructors or conversion operators don't
work. They gave errors when I tried to compile and use them in my test
code. These examples are from my classes in "" in the Boost

From "sgn_mag.hpp"
// Why doesn't this work?!
// template <typename U>
// sgn_mag( const sgn_mag<U>& other )
// : mag_( other.magnitude() ), sgn_( other.negative() )
// {}

From "imaginary.hpp"
    operator std::complex<T>() const
        { return std::complex<T>( j_ - j_, j_ ); }
// Why is this giving syntax errors
// template <typename U = T>
// operator std::complex<U>() const
// { return std::complex<U>( j_ - j_, j_ ); }

I'm using Metrowerks CodeWarrior Pro 5 with the 5.3 update for the (regular)
Mac OS. Is my code screwed-up or is the compiler missing something?

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

Boost list run by bdawes at, gregod at, cpdaniel at, john at