The documentation of former versions is available in the history (e.g.
by checking out the appropriate git tags), so there is no need to keep
them in parallel to the current documentation.
The documentation of former versions is available in the history (e.g.
by checking out the appropriate git tags), so there is no need to keep
them in parallel to the current documentation.
Use `EXCLUDE_FROM_ALL` in `add_subdirectory` to prevent `make install` from including lots of headers from gtest/gmock.
```
add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
${CMAKE_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)
```
The document itself uses lambdas later, all the scaffolding to
work around lack of lambdas should be considered for removal, but
that is much larger an effort than I can commit to.
Re-use existing background color for Widows' console window.
This fixes a problem where the background color for ColoredPrintf would be BLACK even if the user's console is using a different BG color.
This merges a Google-internal change (117235625).
Original CL description:
This CL was created manually in about an hour with sed, a Python script
to find all the places unqualified 'string' was mentioned, and some help
from Emacs to add the "std::" qualifications, plus a few manual tweaks.
This upstreams a Google-internal change.
Original CL description:
The C++ standard says that function pointers are not implicitly
convertible to object pointers. Visual Studio disregards that and allows
implicit conversion between function pointers and object points, and
enough code relies on this that clang follows suit in
Microsoft-compatibility mode.
However, clang emits a -Wmicrosoft-cast warning when such a conversion
is done:
E:\b\c\b\win_clang\src\sandbox\win\src\sync_dispatcher.cc(42,7):
warning: implicit conversion between pointer-to-function and
pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]
This change fixes this warning in gtest, while hopefully not changing
any behavior. The change does two things:
1. It replaces the if in DefaultPrintTo with SFINAE
2. In C++11 mode, it uses enable_if<is_function<>> instead of
ImplicitlyConvertible<T*, const void*> to check if the
explicit cast is needed.
With this change, functions will use the branch with the reintpret_casts
with Visual Studio and clang/win, and clang no longer needs to warn
that it implicitly converts a function pointer to a void pointer.