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