diff options
author | kosak <kosak@google.com> | 2013-12-04 23:44:22 +0000 |
---|---|---|
committer | kosak <kosak@google.com> | 2013-12-04 23:44:22 +0000 |
commit | 4f7018ed61966eafae2095ada227075e1ea6377c (patch) | |
tree | 6744c4e9cb780f53204650041fdeecf169df9de2 /include/gtest/internal/gtest-port.h | |
parent | 5d83ee08dff5775b3bc59d144bc3ea3d4fe9dfb9 (diff) | |
download | googletest-4f7018ed61966eafae2095ada227075e1ea6377c.tar.gz googletest-4f7018ed61966eafae2095ada227075e1ea6377c.tar.bz2 googletest-4f7018ed61966eafae2095ada227075e1ea6377c.zip |
Distinguish between C++11 language and library support for <initializer_list>.
Fix spelling: repositary -> repository.
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r-- | include/gtest/internal/gtest-port.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index b5c64461..0b720dae 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -282,6 +282,14 @@ # endif #endif +// C++11 specifies that <initializer_list> provides std::initializer_list. Use +// that if gtest is used in C++11 mode and libstdc++ isn't very old (binaries +// targeting OS X 10.6 can build with clang but need to use gcc4.2's +// libstdc++). +#if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325) +# define GTEST_HAS_STD_INITIALIZER_LIST_ 1 +#endif + // Brings in definitions for functions used in the testing::internal::posix // namespace (read, write, close, chdir, isatty, stat). We do not currently // use them on Windows Mobile. |