Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
b62c1203
Commit
b62c1203
authored
Dec 14, 2015
by
mk kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typographical error
parent
62127a27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
example/example1.cpp
+4
-4
No files found.
example/example1.cpp
View file @
b62c1203
...
@@ -35,16 +35,16 @@ public:
...
@@ -35,16 +35,16 @@ public:
void
operator
=
(
const
Example1
&
e
)
{
cout
<<
"Assignment operator"
<<
endl
;
value
=
e
.
value
;
}
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
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
add2
(
Example1
&
other
)
{
value
+=
other
.
value
;
}
// passing by reference
void
add3
(
const
Example1
&
other
)
{
value
+=
other
.
value
;
}
// passing by const 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
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
add7
(
int
&
other
)
{
value
+=
other
;
}
// passing by reference
void
add8
(
const
int
&
other
)
{
value
+=
other
;
}
// passing by const 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
void
add10
(
const
int
*
other
)
{
value
+=
*
other
;
}
// passing by const pointer
Example1
self1
()
{
return
*
this
;
}
// return by value
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