bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

URLStream sock; .... if (!sock) ---> ambiguous operator!() --> Socket/i


From: George Yohng
Subject: URLStream sock; .... if (!sock) ---> ambiguous operator!() --> Socket/istream
Date: Fri, 12 Sep 2003 10:07:56 -0400

When an URLStream is declared and one would want to check it against being 
valid with operator!, compiler error is issued.

conversion to bool works allright.

URLStream sock;

if (!sock) -----> fails during compilation

if (!(bool)sock) --------> works

One has to add this operator explicitly to URLStream, I guess.

Otherwise, lowercase tcpstream implements this operator, is it that there 
should be lowercase urlstream also?

Thanks,
George.


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455




reply via email to

[Prev in Thread] Current Thread [Next in Thread]