Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
3c7868a9
Commit
3c7868a9
authored
Feb 19, 2009
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates the definitions of GTEST_HAS_EXCEPTIONS and GTEST_HAS_STD_STRING to be…
Updates the definitions of GTEST_HAS_EXCEPTIONS and GTEST_HAS_STD_STRING to be C++ standard compliant.
parent
f0048c1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
gtest-port.h
include/gtest/internal/gtest-port.h
+10
-3
No files found.
include/gtest/internal/gtest-port.h
View file @
3c7868a9
...
@@ -220,7 +220,11 @@
...
@@ -220,7 +220,11 @@
// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. For
// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. For
// other compilers, we assume exceptions are disabled to be
// other compilers, we assume exceptions are disabled to be
// conservative.
// conservative.
#define GTEST_HAS_EXCEPTIONS (defined(__GNUC__) && __EXCEPTIONS)
#if defined(__GNUC__) && __EXCEPTIONS
#define GTEST_HAS_EXCEPTIONS 1
#else
#define GTEST_HAS_EXCEPTIONS 0
#endif // defined(__GNUC__) && __EXCEPTIONS
#endif // _MSC_VER
#endif // _MSC_VER
// Determines whether ::std::string and ::string are available.
// Determines whether ::std::string and ::string are available.
...
@@ -230,8 +234,11 @@
...
@@ -230,8 +234,11 @@
// need to figure it out. The only environment that we know
// need to figure it out. The only environment that we know
// ::std::string is not available is MSVC 7.1 or lower with exceptions
// ::std::string is not available is MSVC 7.1 or lower with exceptions
// disabled.
// disabled.
#define GTEST_HAS_STD_STRING \
#if defined(_MSC_VER) && (_MSC_VER < 1400) && !GTEST_HAS_EXCEPTIONS
(!(defined(_MSC_VER) && (_MSC_VER < 1400) && !GTEST_HAS_EXCEPTIONS))
#define GTEST_HAS_STD_STRING 0
#else
#define GTEST_HAS_STD_STRING 1
#endif
#endif // GTEST_HAS_STD_STRING
#endif // GTEST_HAS_STD_STRING
#ifndef GTEST_HAS_GLOBAL_STRING
#ifndef GTEST_HAS_GLOBAL_STRING
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment