diff options
author | Gennadiy Civil <misterg@google.com> | 2019-05-17 19:05:43 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-05-17 19:05:44 (GMT) |
commit | 03273a89827ffedfee19cfaae5d85dee60779441 (patch) | |
tree | 05643304ce1e569bbbe6384fd8a51b6587c37979 /googletest/include/gtest | |
parent | 9d4cde44a4a3952cf21861f9370b3bed9265dfd7 (diff) | |
parent | 5b4a135f626e60fde618da9eb10ae2a21934de01 (diff) | |
download | googletest-03273a89827ffedfee19cfaae5d85dee60779441.zip googletest-03273a89827ffedfee19cfaae5d85dee60779441.tar.gz googletest-03273a89827ffedfee19cfaae5d85dee60779441.tar.bz2 |
Merge pull request #2254 from chaoran:master
PiperOrigin-RevId: 248759825
Diffstat (limited to 'googletest/include/gtest')
-rw-r--r-- | googletest/include/gtest/gtest-printers.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index 97cdb2a..56a0545 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -151,9 +151,10 @@ class TypeWithoutFormatter { public: // This default version is called when kTypeKind is kOtherType. static void PrintValue(const T& value, ::std::ostream* os) { - PrintBytesInObjectTo(static_cast<const unsigned char*>( - reinterpret_cast<const void*>(&value)), - sizeof(value), os); + PrintBytesInObjectTo( + static_cast<const unsigned char*>( + reinterpret_cast<const void*>(std::addressof(value))), + sizeof(value), os); } }; |