Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-08-22 16:00:38


----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, August 22, 2002 5:07 PM
Subject: Re: [boost] value_initialized<> utility template

> 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
> better
>
> CWPro8: no complaints
>
> VC7:
>
> vc-C++ c:\build\bin\foo.exe\vc7\debug\runtime-link-dynamic\foo.obj
> foo.cpp
> 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
>
Thanks!

I will leave only 'operator T& () const' then, with appropriate rationale
and warnings on the docs.

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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