One option is to re-enable TR1; do this by defining the _HAS_TR1_NAMESPACE macro, as summarized in this blog article . If you use the MSBuild project, this is best done according to your project, setting up the preprocessor parameters ; or if you use a precompiled header by defining it at the top of the specified PCH.
The best option is to inform GTest that your compiler supports C ++ 11 by defining the macro GTEST_LANG_CXX11 to 1 before including any GTest headers; then it will use std::tuple , not std::tr1::tuple *. ( The detection logic for GTest C ++ 11 is __cplusplus oriented, which VC ++ has not yet updated, despite the fact that it is mainly C ++ 11 and C ++ 14. I would say that this is a bug in GTest, since it supports VC ++ elsewhere throughout the configuration logic.)
* Not to mention the other features of C ++ 11, so this is the best option: -]
source share