aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-08-19 14:03:30 -0400
committerGitHub <noreply@github.com>2018-08-19 14:03:30 -0400
commit97274b1e9488e8814d978f164510a8bca52509f0 (patch)
tree5ca1063e0b6e4117e3592c74350d1d95cb595d04
parent88cd66513c6414cdc6f1d4f7733bd520337864a9 (diff)
parentd1c1aac78160ae31353d9fe1bb1171353986a4f1 (diff)
downloadgoogletest-97274b1e9488e8814d978f164510a8bca52509f0.tar.gz
googletest-97274b1e9488e8814d978f164510a8bca52509f0.tar.bz2
googletest-97274b1e9488e8814d978f164510a8bca52509f0.zip
Merge branch 'master' into fix-argc
-rw-r--r--googletest/cmake/internal_utils.cmake5
-rw-r--r--googletest/docs/advanced.md8
-rw-r--r--googletest/include/gtest/gtest-printers.h9
3 files changed, 14 insertions, 8 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index b78dbcc7..566c02fc 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -38,6 +38,11 @@ macro(fix_default_compiler_settings_)
# We prefer more strict warning checking for building Google Test.
# Replaces /W3 with /W4 in defaults.
string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}")
+
+ # Prevent D9025 warning for targets that have exception handling
+ # turned off (/EHs-c- flag). Where required, exceptions are explicitly
+ # re-enabled using the cxx_exception_flags variable.
+ string(REPLACE "/EHsc" "" ${flag_var} "${${flag_var}}")
endforeach()
endif()
endmacro()
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md
index 0a92e524..3a097f1b 100644
--- a/googletest/docs/advanced.md
+++ b/googletest/docs/advanced.md
@@ -572,7 +572,7 @@ namespace foo {
class Bar { // We want googletest to be able to print instances of this.
...
// Create a free inline friend function.
- friend ::std::ostream& operator<<(::std::ostream& os, const Bar& bar) {
+ friend std::ostream& operator<<(std::ostream& os, const Bar& bar) {
return os << bar.DebugString(); // whatever needed to print bar to os
}
};
@@ -580,7 +580,7 @@ class Bar { // We want googletest to be able to print instances of this.
// If you can't declare the function in the class it's important that the
// << operator is defined in the SAME namespace that defines Bar. C++'s look-up
// rules rely on that.
-::std::ostream& operator<<(::std::ostream& os, const Bar& bar) {
+std::ostream& operator<<(std::ostream& os, const Bar& bar) {
return os << bar.DebugString(); // whatever needed to print bar to os
}
@@ -601,7 +601,7 @@ namespace foo {
class Bar {
...
- friend void PrintTo(const Bar& bar, ::std::ostream* os) {
+ friend void PrintTo(const Bar& bar, std::ostream* os) {
*os << bar.DebugString(); // whatever needed to print bar to os
}
};
@@ -609,7 +609,7 @@ class Bar {
// If you can't declare the function in the class it's important that PrintTo()
// is defined in the SAME namespace that defines Bar. C++'s look-up rules rely
// on that.
-void PrintTo(const Bar& bar, ::std::ostream* os) {
+void PrintTo(const Bar& bar, std::ostream* os) {
*os << bar.DebugString(); // whatever needed to print bar to os
}
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h
index c67e30a1..51865f84 100644
--- a/googletest/include/gtest/gtest-printers.h
+++ b/googletest/include/gtest/gtest-printers.h
@@ -978,12 +978,13 @@ struct TuplePolicy {
static const size_t tuple_size = ::std::tr1::tuple_size<Tuple>::value;
template <size_t I>
- struct tuple_element : ::std::tr1::tuple_element<I, Tuple> {};
+ struct tuple_element : ::std::tr1::tuple_element<static_cast<int>(I), Tuple> {
+ };
template <size_t I>
- static typename AddReference<
- const typename ::std::tr1::tuple_element<I, Tuple>::type>::type get(
- const Tuple& tuple) {
+ static typename AddReference<const typename ::std::tr1::tuple_element<
+ static_cast<int>(I), Tuple>::type>::type
+ get(const Tuple& tuple) {
return ::std::tr1::get<I>(tuple);
}
};