diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-08-18 17:15:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-18 17:15:35 (GMT) |
commit | a946f7db03fb15fbed6f5f43f78509513bfe6396 (patch) | |
tree | 55741d0f6ba414c1b1f082187c31cd791ddac28c | |
parent | cb69e686df17f9f0db7815c540bb03ec1f61e25e (diff) | |
parent | d1c1aac78160ae31353d9fe1bb1171353986a4f1 (diff) | |
download | googletest-a946f7db03fb15fbed6f5f43f78509513bfe6396.zip googletest-a946f7db03fb15fbed6f5f43f78509513bfe6396.tar.gz googletest-a946f7db03fb15fbed6f5f43f78509513bfe6396.tar.bz2 |
Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 5 | ||||
-rw-r--r-- | googletest/include/gtest/gtest-printers.h | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index b78dbcc..566c02f 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/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index c67e30a..51865f8 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); } }; |