Boost logo

Boost :

Subject: [boost] [endian] superfluous boost::operators<> ?
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-09-17 02:58:49

I discovered, that the following will not compile:

unsigned u;
ulittle32_t u1;
ulittle32_t u2;

u = 1;
u1 = 1;
u2 = u1 + u;

The compiler complains about not being able to resolve
similar conversions.

My guess is, that using boost::operators<> _and_
providing type conversion operators at the same time
is causing this.

I think it should be enough to define the essential
operators in cover_operators template, and omit
boost::operators<> at all.

At least I am not able to find any problems with this,
since the compiler adjusts the arguments (using the
provided type conversion operators?) and calls the built in
operators, thereby resolving ambiguity.

Any thoughts?

  _  _  | Roland Schwarz
 |_)(_  | aka. speedsnail
 | \__) | mailto:roland.schwarz_at_[hidden]

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