Thanks, I just thought it was more complicated than that. I just defined the operator at the top of my testfile and it seems to be working. :)
Kirstin -----Ursprüngliche Nachricht----- Von: Konstantin Tokarev [mailto:[email protected]] Gesendet: Freitag, 21. September 2012 12:04 An: Heidler, Kirstin (GE Oil & Gas); [email protected] Betreff: Re: [Interest] Using QT and boost unit test: problem with QString 21.09.2012, 14:01, "Heidler, Kirstin (GE Oil & Gas)" <[email protected]>: > I have to use boost unit test (not my choice). QT unit tests were working > fine. > > I have the problem, that somewhere boost wants to append a const QString to > an ostream.(I do not exactly know where this call occurs, since it is hidden > in macros, but I know it is for writing a log file) > > So I get the compile error C2697: binary operator '<<': no operator found > which takes a right-hand operand of type ‘const QString’ (or there is no > acceptable conversion). > > I don’t want to change boost source files. Is there another way to resolve > this error? The beautiful thing about operator overloading is that you don't have to modify library sources. You just define your own operator<< in your code, and that's all. -- Regards, Konstantin _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
