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
OpenDAS
dlib
Commits
65914e72
Commit
65914e72
authored
Dec 09, 2016
by
Davis King
Browse files
Made dlib::array movable.
parent
44c3a982
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
dlib/array/array_kernel.h
dlib/array/array_kernel.h
+15
-0
dlib/array/array_kernel_abstract.h
dlib/array/array_kernel_abstract.h
+19
-0
No files found.
dlib/array/array_kernel.h
View file @
65914e72
...
@@ -90,6 +90,21 @@ namespace dlib
...
@@ -90,6 +90,21 @@ namespace dlib
_at_start
(
true
)
_at_start
(
true
)
{}
{}
array
(
array
&&
item
)
:
array
()
{
swap
(
item
);
}
array
&
operator
=
(
array
&&
item
)
{
swap
(
item
);
return
*
this
;
}
explicit
array
(
explicit
array
(
unsigned
long
new_size
unsigned
long
new_size
)
:
)
:
...
...
dlib/array/array_kernel_abstract.h
View file @
65914e72
...
@@ -85,6 +85,25 @@ namespace dlib
...
@@ -85,6 +85,25 @@ namespace dlib
- all memory associated with *this has been released
- all memory associated with *this has been released
!*/
!*/
array
(
array
&&
item
);
/*!
ensures
- move constructs *this from item. Therefore, the state of item is
moved into *this and #item has a valid but unspecified state.
!*/
array
&
operator
=
(
array
&&
item
);
/*!
ensures
- move assigns *this from item. Therefore, the state of item is
moved into *this and #item has a valid but unspecified state.
- returns a reference to #*this
!*/
void
clear
(
void
clear
(
);
);
/*!
/*!
...
...
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