Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
157
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas
athena
Merge requests
!31227
CxxUtils: Remove copy_if.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
CxxUtils: Remove copy_if.
ssnyder/athena:copyif.CxxUtils-20200316
into
master
Overview
3
Commits
1
Pipelines
1
Changes
3
Merged
Scott Snyder
requested to merge
ssnyder/athena:copyif.CxxUtils-20200316
into
master
4 years ago
Overview
3
Commits
1
Pipelines
1
Changes
3
Expand
This is not used anywhere in Athena, and it's provided now by the standard library.
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
594ee871
1 commit,
4 years ago
3 files
+
1
−
141
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
Control/CxxUtils/CxxUtils/algorithms.h deleted
100644 → 0
+
0
−
55
Options
///////////////////////// -*- C++ -*- /////////////////////////////
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// algorithms.h
// Header file for CxxUtils::copy_if - copied from gcc4.4
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef CXXUTILS_ALGORITHMS_H
#define CXXUTILS_ALGORITHMS_H
/**
* @brief Copy the elements of a sequence for which a predicate is true.
* @ingroup mutating_algorithms
* @param first An input iterator.
* @param last An input iterator.
* @param result An output iterator.
* @param pred A predicate.
* @return An iterator designating the end of the resulting sequence.
*
* Copies each element in the range @p [first,last) for which
* @p pred returns true to the range beginning at @p result.
*
* copy_if() is stable, so the relative order of elements that are
* copied is unchanged.
*
* <i>Example</i>:
* @code
* CxxUtils::copy_if( in.begin(), in.end(),
* std::back_inserter(out), filter );
* @endcode
* where in and out are STL-like containers and filter is a predicate
*/
namespace
CxxUtils
{
template
<
typename
InputIterator
,
typename
OutputIterator
,
typename
Predicate
>
OutputIterator
copy_if
(
InputIterator
first
,
InputIterator
last
,
OutputIterator
result
,
Predicate
pred
)
{
for
(;
first
!=
last
;
++
first
)
if
(
pred
(
*
first
))
{
*
result
=
*
first
;
++
result
;
}
return
result
;
}
}
//> end CxxUtils namespace
#endif //> CXXUTILS_ALGORITHMS_H
Loading