-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAlgorithms.hxx
More file actions
48 lines (37 loc) · 1.09 KB
/
Algorithms.hxx
File metadata and controls
48 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Copyright 2015, 2016 Robert Haberlach
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) */
#pragma once
#include "Assert.hxx"
#include "Iterator.hxx"
#include "Vector.hxx"
#include <experimental/algorithm>
#include <functional>
#include <utility>
namespace Constainer {
using STD::max;
using STD::min;
template <typename F>
struct NegateFunctor {
F f;
constexpr NegateFunctor(F const& f) : f(f) {}
template <typename... Args>
constexpr bool operator()(Args&&... args) const {
return !f(STD::forward<Args>(args)...);
}
};
template <typename F>
constexpr auto negateFunctor(F const& f) {
return NegateFunctor<F>(f);
}
struct IdentityFunctor {
template <typename T>
constexpr decltype(auto) operator()(T&& t) const {return STD::forward<T>(t);}
};
}
#include "impl/Algorithms/Copy.hxx"
#include "impl/Algorithms/BinarySeqOps.hxx"
#include "impl/Algorithms/NonModifying.hxx"
#include "impl/Algorithms/Numerical.hxx"
#include "impl/Algorithms/Partitioning.hxx"
#include "impl/Algorithms/Transformations.hxx"