MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / PrintTo

Function PrintTo

rtpose_wrapper/src/gtest/gtest.h:9538–9562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9536// wants).
9537template <typename T>
9538void PrintTo(const T& value, ::std::ostream* os) {
9539 // DefaultPrintTo() is overloaded. The type of its first two
9540 // arguments determine which version will be picked. If T is an
9541 // STL-style container, the version for container will be called; if
9542 // T is a pointer, the pointer version will be called; otherwise the
9543 // generic version will be called.
9544 //
9545 // Note that we check for container types here, prior to we check
9546 // for protocol message types in our operator<<. The rationale is:
9547 //
9548 // For protocol messages, we want to give people a chance to
9549 // override Google Mock's format by defining a PrintTo() or
9550 // operator<<. For STL containers, other formats can be
9551 // incompatible with Google Mock's format for the container
9552 // elements; therefore we check for container types here to ensure
9553 // that our format is used.
9554 //
9555 // The second argument of DefaultPrintTo() is needed to bypass a bug
9556 // in Symbian's C++ compiler that prevents it from picking the right
9557 // overload between:
9558 //
9559 // PrintTo(const T& x, ...);
9560 // PrintTo(T* x, ...);
9561 DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
9562}
9563
9564// The following list of PrintTo() overloads tells
9565// UniversalPrinter<T>::Print() how to print standard types (built-in

Callers 1

PrintMethod · 0.70

Calls 4

DefaultPrintToFunction · 0.85
PrintStringToFunction · 0.85
PrintWideStringToFunction · 0.85
PrintTupleToFunction · 0.85

Tested by

no test coverage detected