Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
101b5288
Commit
101b5288
authored
Nov 07, 2019
by
Marc Chevrier
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmAlgorithm: Extend cmAppend capabilities
parent
eb306700
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Source/cmAlgorithms.h
Source/cmAlgorithms.h
+8
-0
No files found.
Source/cmAlgorithms.h
View file @
101b5288
...
...
@@ -8,6 +8,7 @@
#include <algorithm>
#include <functional>
#include <iterator>
#include <memory>
#include <unordered_set>
#include <utility>
#include <vector>
...
...
@@ -144,6 +145,13 @@ void cmDeleteAll(Range const& r)
ContainerAlgorithms
::
DefaultDeleter
<
Range
>
());
}
template
<
typename
T
>
void
cmAppend
(
std
::
vector
<
T
*>&
v
,
std
::
vector
<
std
::
unique_ptr
<
T
>>
const
&
r
)
{
std
::
transform
(
r
.
begin
(),
r
.
end
(),
std
::
back_inserter
(
v
),
[](
const
std
::
unique_ptr
<
T
>&
item
)
{
return
item
.
get
();
});
}
template
<
typename
T
,
typename
Range
>
void
cmAppend
(
std
::
vector
<
T
>&
v
,
Range
const
&
r
)
{
...
...
Brad King
@brad.king
mentioned in commit
ccd2c282
·
Nov 12, 2019
mentioned in commit
ccd2c282
mentioned in commit ccd2c2824aea342b66adde1001753181375c49dc
Toggle commit list
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