|
Boost Users : |
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-05-05 00:59:37
I believe template resolution rules prohibit implicit conversion. You need to define operator<<, or use BOOST_TEST_DONT_PRINT_LOG_VALUE( Foo );
Gennadiy
"Robert Dailey" <rcdailey_at_[hidden]> ???????/???????? ? ???????? ?????????: news:496954360805021435p6cbc5c60oadae02d7de234d96_at_mail.gmail.com...
Yes, the streaming operator I ended up trying and it worked (after I posted), but one thing I left out in my original post was the fact that I had an overloaded casting operator to std::string, which I figured would fix the issue just as well as the stream operator would. I was wrong, and that is what motivated me originally to post.
As far as this problem is concerned, however, it's solved.
On Fri, May 2, 2008 at 3:36 PM, Sohail Somani <sohail_at_[hidden]> wrote:
Robert Dailey wrote:
[snip]
> Anyway, I have a class named "Foo", and I've given it an overloaded
> boolean == operator. When I do the following, it fails to compile under
> MSVC9:
Dude, read the error:
[snip]
> 1>c:\it\tfs\crusades\sdks\boost\boost\test\test_tools.hpp(342) : error
> C2679: binary '<<' : no operator found which takes a right-hand operand
> of type 'const Foo' (or there is no acceptable conversion)
No operator<< not ==. Boost test has something like this for
CHECK_EQUAL(a,b):
if(a!=b) { cout << "omg a!=b [a=" << a << ", b=" << b << "]" }
--
Sohail Somani
http://uint32t.blogspot.com
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
------------------------------------------------------------------------------
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net