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
38dd831d
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "7bc8b92384e0b2f7d7107e5eb8445702d4918648"
Commit
38dd831d
authored
Oct 08, 2017
by
Davis King
Browse files
Made dlib::array able to push_back() from rvalues.
parent
17a6e682
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-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
+5
-0
No files found.
dlib/array/array_kernel.h
View file @
38dd831d
...
...
@@ -193,6 +193,10 @@ namespace dlib
T
&
item
);
void
push_back
(
T
&&
item
);
typedef
T
*
iterator
;
typedef
const
T
*
const_iterator
;
iterator
begin
()
{
return
array_elements
;
}
...
...
@@ -779,6 +783,17 @@ namespace dlib
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
T
,
typename
mem_manager
>
void
array
<
T
,
mem_manager
>::
push_back
(
T
&&
item
)
{
push_back
(
item
);
}
// ----------------------------------------------------------------------------------------
template
<
typename
T
,
typename
MM
>
...
...
dlib/array/array_kernel_abstract.h
View file @
38dd831d
...
...
@@ -274,6 +274,11 @@ namespace dlib
If an exception is thrown then it has no effect on *this.
!*/
void
push_back
(
T
&&
item
)
{
push_back
(
item
);
}
/*!
enable push_back from rvalues
!*/
typedef
T
*
iterator
;
typedef
const
T
*
const_iterator
;
...
...
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