Note: we deliberately don't call this PrintTo(), as that name conflicts with ::testing::internal::PrintTo in the body of the function.
| 9774 | // conflicts with ::testing::internal::PrintTo in the body of the |
| 9775 | // function. |
| 9776 | static void Print(const T& value, ::std::ostream* os) { |
| 9777 | // By default, ::testing::internal::PrintTo() is used for printing |
| 9778 | // the value. |
| 9779 | // |
| 9780 | // Thanks to Koenig look-up, if T is a class and has its own |
| 9781 | // PrintTo() function defined in its namespace, that function will |
| 9782 | // be visible here. Since it is more specific than the generic ones |
| 9783 | // in ::testing::internal, it will be picked by the compiler in the |
| 9784 | // following statement - exactly what we want. |
| 9785 | PrintTo(value, os); |
| 9786 | } |
| 9787 | |
| 9788 | #ifdef _MSC_VER |
| 9789 | # pragma warning(pop) // Restores the warning state. |