Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-22 15:07:00

From: "Fernando Cacciola" <fcacciola_at_[hidden]>

> I'd like to know how the latest releases of these (and other compilers)
> handle this before I make a decision.

---------On Windows--------

GCC 3.2:

foo.cpp: In function `int main()':
foo.cpp:12: warning: choosing `X::operator int&()' over `X::operator const
   int&() const'
foo.cpp:12: warning: for conversion from `X' to `int'
foo.cpp:12: warning: because conversion sequence for the argument is

CWPro8: no complaints


vc-C++ c:\build\bin\foo.exe\vc7\debug\runtime-link-dynamic\foo.obj
foo.cpp(12) : error C2593: 'operator ==' is ambiguous
        could be 'built-in C++ operator==(int, int)'
        or 'built-in C++ operator==(const int, int)'
        while trying to match the argument list '(X, int)'

VC7.1: Can't tell you

VC6: fails with no diagnostic!

Intel 5: no complaints

Intel 6: no complaints

           David Abrahams * Boost Consulting
dave_at_[hidden] *

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