diff options
| author | Christian Sigg <csigg@google.com> | 2019-12-09 13:32:53 -0800 |
|---|---|---|
| committer | Artem Belevich <tra@google.com> | 2019-12-09 14:00:53 -0800 |
| commit | d5acc83a3ac3db85ca30b9e73b1bdb112f313d1b (patch) | |
| tree | 7c2952cac15f40c78af9fb8509b73718443d0dc4 /clang/lib/CodeGen/CGDeclCXX.cpp | |
| parent | 9ef451d1fdaa9a1cadf1a99c3540253a0e9c118d (diff) | |
| download | bcm5719-llvm-d5acc83a3ac3db85ca30b9e73b1bdb112f313d1b.tar.gz bcm5719-llvm-d5acc83a3ac3db85ca30b9e73b1bdb112f313d1b.zip | |
Implement LWG#1203 for raw_ostream.
Implement LWG#1203 (https://cplusplus.github.io/LWG/issue1203) for raw_ostream
like libc++ does for std::basic_ostream<...>.
Add a operator<< overload that takes an rvalue reference of a typed derived from
raw_ostream, streams the value to it and returns the stream of the same type as
the argument.
This allows free operator<< to work with rvalue reference raw_ostreams:
raw_ostream& operator<<(raw_ostream&, const SomeType& Value);
raw_os_ostream(std::cout) << SomeType();
It also allows using the derived type like:
auto Foo = (raw_string_ostream(buffer) << "foo").str();
Author: Christian Sigg <csigg@google.com>
Differential Revision: https://reviews.llvm.org/D70686
Diffstat (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp')
0 files changed, 0 insertions, 0 deletions

