Make IStream::stream non-const
This way it makes much more sense from logically-const point of view, and also means that concrete implementations don't have to always have a `mutable` keyword on the stream member.
This commit is contained in:
11 files changed
+32
-32
No files matched your search
@@ -29,10 +29,10 @@
|
||||
namespace {
|
||||
class StringIStream : public Catch::IStream {
|
||||
public:
|
||||
std::ostream& stream() const override { return sstr; }
|
||||
std::ostream& stream() override { return sstr; }
|
||||
std::string str() const { return sstr.str(); }
|
||||
private:
|
||||
mutable std::stringstream sstr;
|
||||
std::stringstream sstr;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user