mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Addition to prev. revision [#CLICKHOUSE-2].
This commit is contained in:
parent
db984d92a8
commit
fd5ac57b8e
@ -50,22 +50,27 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class StringHolder {
|
||||
protected:
|
||||
std::string ss;
|
||||
};
|
||||
namespace detail
|
||||
{
|
||||
/// For correct order of initialization.
|
||||
class StringHolder
|
||||
{
|
||||
protected:
|
||||
std::string value;
|
||||
};
|
||||
}
|
||||
|
||||
/// Creates the string by itself and allows to get it.
|
||||
class WriteBufferFromOwnString : public StringHolder, public WriteBufferFromString
|
||||
class WriteBufferFromOwnString : public detail::StringHolder, public WriteBufferFromString
|
||||
{
|
||||
|
||||
public:
|
||||
WriteBufferFromOwnString() : WriteBufferFromString(ss) {}
|
||||
WriteBufferFromOwnString() : WriteBufferFromString(value) {}
|
||||
|
||||
std::string & str()
|
||||
{
|
||||
finish();
|
||||
return ss;
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user