Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-11-26 06:00:39

Robert Ramey wrote:
> When I compile your test program with gcc 3.2 on my windows / cygwin system
> it compiles fine - just as it does on your system.


> When I compile your test program with VC 7.0 I get:
> c:\boost-dev\libs\serialization\test\test_zmisc.cpp(31) : error C2667:
> 'serialize' : none of 3 overloads have a best conversion


Yep, I guess 7.0 does not support partial ordering.

> So, I guess we'll leave the third paramter as a long in serialization.hpp
> in order to support non-conforming compilers. My explanation in the
> documentation regarding the type of the third parameter is absolutely
> incorrect. I will amend it accordingly.

Great. But how can be fix the problem with std::map that I've reported. I
think there's easy solution. Check for BOOST_NO_FUNCTION_TEMPLATE_ORDERING
If it's set, use the current code. Otherwise -- i.e. for conforming compiler,
use "const unsigned int" for catch-all-and-forward-to-class-member function,
not "const unsigned long".

I attach a patch which implements this idea. Of course, comments in
serialization.hpp must be adjusted, but at least the patch works for my case
which did not work before and does not introduce any regressions.
Maybe you can try with VC 7.0 -- though I'm pretty sure it will work for it --
config.hpp defines the macro for 7.0, AFAICT, so my patch will make no
difference for that compiler.

> I'm finding it very confusing to keep overloading/specialization etc
> sorted out in the face of function templates, member function templats, etc
> especially with differing compiler implemention quirks.

All those things can get rather confusing sometimes, that's true!

> Thank you for straightening this out - I'm sure it will save me much future
> embarassment.

You're welcome.

- Volodya

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