Posted by
Luigi Ballabio on
Apr 30, 2008; 11:26am
URL: http://quantlib.414.s1.nabble.com/QL-and-STLport-under-Win32-tp5922p5923.html
On Fri, 2008-04-25 at 11:30 -0500, David Sowinski wrote:
> I have a requirement to utilize STLport in my projects. [...] nearly
> every configuration results in errors of the form:
>
> error C2679: binary '<<' : no operator found which takes a right-hand
> operand of type 'stlp_std::string' (or there is no acceptable
> conversion)
>
> One example of this error can be viewed in daycounter.hpp on line 142:
>
> inline std::ostream& operator<<(std::ostream& out, const DayCounter
> &d) {
> return out << d.name(); ß This is the bad line!
> }
Strange... I'm not familiar with STLport, but it looks as though your
compiler is reading <string> from STLport (hence the stlp_std::string)
but <ostream> from your compiler's STL (which doesn't know about the
STLport types.) Or maybe it's parsing <ostream> before reading
<string>, and therefore doesn't know that std::string has been
associated in some way (#define? typedef?) to stlp_std::string.
My suggestion is to preprocess the source file being compiled (I don't
remember how to do it in Visual Studio---you might have to do it from
the command line) and see what string definition is in scope when
operator<< is defined. Let me know if you find out anything.
Later,
Luigi
--
Present to inform, not to impress; if you inform, you will impress.
-- Fred Brooks
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users