$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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 "more_math.zip" in the Boost
vault.
From "sgn_mag.hpp"
// Why doesn't this work?!
//#ifndef BOOST_NO_MEMBER_TEMPLATES
// template <typename U>
// sgn_mag( const sgn_mag<U>& other )
// : mag_( other.magnitude() ), sgn_( other.negative() )
// {}
//#endif // BOOST_NO_MEMBER_TEMPLATES
From "imaginary.hpp"
//#ifdef BOOST_NO_MEMBER_TEMPLATES
operator std::complex<T>() const
{ return std::complex<T>( j_ - j_, j_ ); }
//#else
// Why is this giving syntax errors
// template <typename U = T>
// operator std::complex<U>() const
// { return std::complex<U>( j_ - j_, j_ ); }
//#endif // BOOST_NO_MEMBER_TEMPLATES
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