Avoids iterator_traits, as it's not available in libCStd when compiled with Sun C++.

This commit is contained in:
zhanyong.wan
2011-04-12 18:24:59 +00:00
parent e9adbcbb56
commit fc99b1ad51
6 changed files with 52 additions and 15 deletions

View File

@@ -140,6 +140,8 @@
//
// Template meta programming:
// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only.
// IteratorTraits - partial implementation of std::iterator_traits, which
// is not available in libCstd when compiled with Sun C++.
//
// Smart pointers:
// scoped_ptr - as in TR2.
@@ -1466,6 +1468,21 @@ struct is_pointer : public false_type {};
template <typename T>
struct is_pointer<T*> : public true_type {};
template <typename Iterator>
struct IteratorTraits {
typedef typename Iterator::value_type value_type;
};
template <typename T>
struct IteratorTraits<T*> {
typedef T value_type;
};
template <typename T>
struct IteratorTraits<const T*> {
typedef T value_type;
};
#if GTEST_OS_WINDOWS
# define GTEST_PATH_SEP_ "\\"
# define GTEST_HAS_ALT_PATH_SEP_ 1