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
ec2c911b
Unverified
Commit
ec2c911b
authored
May 21, 2018
by
James Dennett
Committed by
GitHub
May 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Downgrade to C++98 code.
Some users are not ready for C++11 yet.
parent
89286a4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
gtest-type-util.h
googletest/include/gtest/internal/gtest-type-util.h
+6
-6
No files found.
googletest/include/gtest/internal/gtest-type-util.h
View file @
ec2c911b
...
...
@@ -62,12 +62,12 @@ namespace internal {
// used by various standard libraries (e.g., `std::__1`). Names outside
// of namespace std are returned unmodified.
inline
std
::
string
CanonicalizeForStdLibVersioning
(
std
::
string
s
)
{
static
const
expr
char
prefix
[]
=
"std::__"
;
static
const
char
prefix
[]
=
"std::__"
;
if
(
s
.
compare
(
0
,
strlen
(
prefix
),
prefix
)
==
0
)
{
auto
end
=
s
.
find
(
"::"
,
strlen
(
prefix
));
std
::
string
::
size_type
end
=
s
.
find
(
"::"
,
strlen
(
prefix
));
if
(
end
!=
s
.
npos
)
{
// Erase
the `::__` plus whatever was between that and the next
`::`.
s
.
erase
(
strlen
(
"std"
),
strlen
(
"::__"
)
+
end
-
strlen
(
prefix
));
// Erase
everything between the initial `std` and the second
`::`.
s
.
erase
(
strlen
(
"std"
),
end
-
strlen
(
"std"
));
}
}
return
s
;
...
...
@@ -89,9 +89,9 @@ std::string GetTypeName() {
using
abi
::
__cxa_demangle
;
# endif // GTEST_HAS_CXXABI_H_
char
*
const
readable_name
=
__cxa_demangle
(
name
,
0
,
0
,
&
status
);
std
::
string
name_str
(
status
==
0
?
readable_name
:
name
);
const
std
::
string
name_str
(
status
==
0
?
readable_name
:
name
);
free
(
readable_name
);
return
CanonicalizeForStdLibVersioning
(
std
::
move
(
name_str
)
);
return
CanonicalizeForStdLibVersioning
(
name_str
);
# else
return
name
;
# endif // GTEST_HAS_CXXABI_H_ || __HP_aCC
...
...
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