Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2006-10-18 07:20:21


John Maddock ha escrito:

> Joaquin M Lopez Munoz wrote:
> > Let me try my hand at it first, I think I'll be able to make
> > it work in a few days.
>
> Thanks Joaquin: in the mean time you might like to know that most of the
> currect errors are down to problems with using declarations and those
> compilers, here are my current patches that I think gets everything except
> those non-member operators working.

Well, I think I've got it. After applying your patch, the remaining
issues were:

* MSVC 6.5/7.0 needs that the various rational<T> types involved be
explicitly instantiated vg as follows:

::boost::rational<short> dummy1;
::boost::rational<int> dummy2;
::boost::rational<long> dummy3;
::boost::rational<MyInt> dummy4;

in order to fully generate the associated friend operators. This is not the
first time I see this behavior, seems like the compiler has problems with
Barton-Nackman injected operators when the associated type is
instantiated only inside template code.

* Old compilers like MSVC 6.5/7.0, BCB and CW 8.2 seem to have
problems with brace-enclosed initializer lists for an aggregate type
at line 130. The simple solution is to do the initialization by hand.

With these changes things go smooth with MSVC 6.5. I can't try
MSVC 7.0, BCB and CW 8.3 but I'm quite confident these will be
cleared also. This will leave us with Sun 5.8, about which I don't have any
clue.

Could you sanity check the attached files? If no objection is raised
I can commit later this afternoon

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo





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