Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
b62c1203
"tests/pure_cpp/smart_holder_poc_test.cpp" did not exist on "4a879cfdcbe38ec67281e53dd0433413f02e8c4e"
Commit
b62c1203
authored
Dec 14, 2015
by
mk kim
Browse files
Fix typographical error
parent
62127a27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
example/example1.cpp
example/example1.cpp
+4
-4
No files found.
example/example1.cpp
View file @
b62c1203
...
...
@@ -35,16 +35,16 @@ public:
void
operator
=
(
const
Example1
&
e
)
{
cout
<<
"Assignment operator"
<<
endl
;
value
=
e
.
value
;
}
void
operator
=
(
Example1
&&
e
)
{
cout
<<
"Move assignment operator"
<<
endl
;
value
=
e
.
value
;
e
.
value
=
0
;}
void
add1
(
Example1
other
)
{
value
+=
other
.
value
;
}
// passing
p
y value
void
add1
(
Example1
other
)
{
value
+=
other
.
value
;
}
// passing
b
y value
void
add2
(
Example1
&
other
)
{
value
+=
other
.
value
;
}
// passing by reference
void
add3
(
const
Example1
&
other
)
{
value
+=
other
.
value
;
}
// passing by const reference
void
add4
(
Example1
*
other
)
{
value
+=
other
->
value
;
}
// passing
p
y pointer
void
add4
(
Example1
*
other
)
{
value
+=
other
->
value
;
}
// passing
b
y pointer
void
add5
(
const
Example1
*
other
)
{
value
+=
other
->
value
;
}
// passing by const pointer
void
add6
(
int
other
)
{
value
+=
other
;
}
// passing
p
y value
void
add6
(
int
other
)
{
value
+=
other
;
}
// passing
b
y value
void
add7
(
int
&
other
)
{
value
+=
other
;
}
// passing by reference
void
add8
(
const
int
&
other
)
{
value
+=
other
;
}
// passing by const reference
void
add9
(
int
*
other
)
{
value
+=
*
other
;
}
// passing
p
y pointer
void
add9
(
int
*
other
)
{
value
+=
*
other
;
}
// passing
b
y pointer
void
add10
(
const
int
*
other
)
{
value
+=
*
other
;
}
// passing by const pointer
Example1
self1
()
{
return
*
this
;
}
// return by value
...
...
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