Boost logo

Boost :

From: boost_at_[hidden]
Date: 2001-02-25 13:55:16

Can someone just confirm that this is a compiler bug (I'm running
MSVC sp4 I think), for my own sanity?

If a local class called "B" is in the same scope, then B ends up
being used instead of the template parameter "B" as defined in

I would have thought that the template name should override the non-
local class definition though.

I suppose I'll just clock it down to a few more hours wasted
discovering another Microsoft compiler bug:

#include <boost/operators.hpp>

// Uncomment the following class definition to get
// "error C2676: binary '*' : 'class point' does not define this
// operator or a conversion to a type acceptable to the predefined

// struct B {};

class point
: boost::addable<point,
boost::multipliable2<point, float> >
        point operator+=(const point &rhs)
                return *this;
        point operator*=(float rhs)
                return *this;

int main()
        point a;
        point b;
        a * 5.0f;
        return 0;

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