Export tuple and friends in the ::testing namespace.

This commit is contained in:
kosak
2014-04-02 20:26:07 +00:00
parent a6340420b9
commit 5df87d70b6
5 changed files with 70 additions and 51 deletions

View File

@@ -640,8 +640,18 @@ struct _RTL_CRITICAL_SECTION;
// To avoid conditional compilation everywhere, we make it
// gtest-port.h's responsibility to #include the header implementing
// tr1/tuple.
// tuple.
// TODO(sbenza): Enable this block to start using std::tuple instead of
// std::tr1::tuple.
#if 0 && GTEST_HAS_STD_TUPLE_
# include <tuple>
# define GTEST_TUPLE_NAMESPACE_ ::std
#endif
#if GTEST_HAS_TR1_TUPLE
# ifndef GTEST_TUPLE_NAMESPACE_
# define GTEST_TUPLE_NAMESPACE_ ::std::tr1
# endif // GTEST_TUPLE_NAMESPACE_
# if GTEST_USE_OWN_TR1_TUPLE
# include "gtest/internal/gtest-tuple.h"
@@ -952,6 +962,15 @@ namespace testing {
class Message;
// Import tuple and friends into the ::testing namespace.
// It is part of our interface, having them in ::testing allows us to change
// their types as needed.
using GTEST_TUPLE_NAMESPACE_::get;
using GTEST_TUPLE_NAMESPACE_::make_tuple;
using GTEST_TUPLE_NAMESPACE_::tuple;
using GTEST_TUPLE_NAMESPACE_::tuple_size;
using GTEST_TUPLE_NAMESPACE_::tuple_element;
namespace internal {
// A secret type that Google Test users don't know about. It has no