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
07964153
Commit
07964153
authored
Aug 17, 2018
by
Vadim Berezniker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
std references shouldn't be fully qualified
parent
02a8ca87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
advanced.md
googletest/docs/advanced.md
+4
-4
No files found.
googletest/docs/advanced.md
View file @
07964153
...
@@ -572,7 +572,7 @@ namespace foo {
...
@@ -572,7 +572,7 @@ namespace foo {
class
Bar
{
// We want googletest to be able to print instances of this.
class
Bar
{
// We want googletest to be able to print instances of this.
...
...
// Create a free inline friend function.
// Create a free inline friend function.
friend
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
return
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
return
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
}
};
};
...
@@ -580,7 +580,7 @@ class Bar { // We want googletest to be able to print instances of this.
...
@@ -580,7 +580,7 @@ class Bar { // We want googletest to be able to print instances of this.
// If you can't declare the function in the class it's important that the
// If you can't declare the function in the class it's important that the
// << operator is defined in the SAME namespace that defines Bar. C++'s look-up
// << operator is defined in the SAME namespace that defines Bar. C++'s look-up
// rules rely on that.
// rules rely on that.
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Bar
&
bar
)
{
return
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
return
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
}
...
@@ -601,7 +601,7 @@ namespace foo {
...
@@ -601,7 +601,7 @@ namespace foo {
class
Bar
{
class
Bar
{
...
...
friend
void
PrintTo
(
const
Bar
&
bar
,
::
std
::
ostream
*
os
)
{
friend
void
PrintTo
(
const
Bar
&
bar
,
std
::
ostream
*
os
)
{
*
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
*
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
}
};
};
...
@@ -609,7 +609,7 @@ class Bar {
...
@@ -609,7 +609,7 @@ class Bar {
// If you can't declare the function in the class it's important that PrintTo()
// If you can't declare the function in the class it's important that PrintTo()
// is defined in the SAME namespace that defines Bar. C++'s look-up rules rely
// is defined in the SAME namespace that defines Bar. C++'s look-up rules rely
// on that.
// on that.
void
PrintTo
(
const
Bar
&
bar
,
::
std
::
ostream
*
os
)
{
void
PrintTo
(
const
Bar
&
bar
,
std
::
ostream
*
os
)
{
*
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
*
os
<<
bar
.
DebugString
();
// whatever needed to print bar to os
}
}
...
...
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