Terse printing of std::reference_wrapper hides pointer
This matches the intention and documentation of terse printing which generally avoids printing the pointer. PiperOrigin-RevId: 481178950 Change-Id: I27039dac1870934d2d5b212e2cc7e97ab82c5b34
This commit is contained in:
committed by
Copybara-Service
parent
67174c7675
commit
137b6e2770
@@ -891,6 +891,13 @@ class UniversalTersePrinter<T&> {
|
||||
UniversalPrint(value, os);
|
||||
}
|
||||
};
|
||||
template <typename T>
|
||||
class UniversalTersePrinter<std::reference_wrapper<T>> {
|
||||
public:
|
||||
static void Print(std::reference_wrapper<T> value, ::std::ostream* os) {
|
||||
UniversalTersePrinter<T>::Print(value.get(), os);
|
||||
}
|
||||
};
|
||||
template <typename T, size_t N>
|
||||
class UniversalTersePrinter<T[N]> {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user