Note: we deliberately don't call this PrintTo(), as that name conflicts with ::testing::internal::PrintTo in the body of the function.
| 8652 | // conflicts with ::testing::internal::PrintTo in the body of the |
| 8653 | // function. |
| 8654 | static void Print(const T& value, ::std::ostream* os) { |
| 8655 | // By default, ::testing::internal::PrintTo() is used for printing |
| 8656 | // the value. |
| 8657 | // |
| 8658 | // Thanks to Koenig look-up, if T is a class and has its own |
| 8659 | // PrintTo() function defined in its namespace, that function will |
| 8660 | // be visible here. Since it is more specific than the generic ones |
| 8661 | // in ::testing::internal, it will be picked by the compiler in the |
| 8662 | // following statement - exactly what we want. |
| 8663 | PrintTo(value, os); |
| 8664 | } |
| 8665 | |
| 8666 | GTEST_DISABLE_MSC_WARNINGS_POP_() |
| 8667 | }; |