[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    C++ question
From:       Angus Leeming <leeming () lyx ! org>
Date:       2003-02-14 13:43:50
[Download RAW message or body]

André, as our resident c++ guru, why does this compile:
        string data = ...;
        istringstream datastream(data);
        LyXLex lex(0,0);
        lex.setStream(datastream);

and this not:
        LyXLex lex(0,0);
        lex.setStream(istringstream(data));

The compiler complains that it is expecting a std::istream & and got a 
std::stringstream. Is it an lvalue thing? (passed & not const & so I guess 
that the stream is modified...)

-- 
Angus

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic