aligator
0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
make_span.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2023 Glen Joseph Fernandes
3
(glenjofe@gmail.com)
4
5
Distributed under the Boost Software License, Version 1.0.
6
(http://www.boost.org/LICENSE_1_0.txt)
7
*/
8
#ifndef BOOST_CORE_MAKE_SPAN_HPP
9
#define BOOST_CORE_MAKE_SPAN_HPP
10
11
#include "
span.hpp
"
12
13
namespace
boost
{
14
15
template
<
class
I>
16
inline
constexpr
span<I>
17
make_span
(I* f, std::size_t c)
noexcept
18
{
19
return
span<I>
(f, c);
20
}
21
22
template
<
class
I>
23
inline
constexpr
span<I>
24
make_span
(I* f, I* l)
noexcept
25
{
26
return
span<I>
(f, l);
27
}
28
29
template
<
class
T, std::
size_t
N>
30
inline
constexpr
span<T, N>
31
make_span
(T(&a)[N])
noexcept
32
{
33
return
span<T, N>
(a);
34
}
35
36
template
<
class
T, std::
size_t
N>
37
inline
constexpr
span<T, N>
38
make_span
(std::array<T, N>& a)
noexcept
39
{
40
return
span<T, N>
(a);
41
}
42
43
template
<
class
T, std::
size_t
N>
44
inline
constexpr
span<const T, N>
45
make_span
(
const
std::array<T, N>& a)
noexcept
46
{
47
return
span<const T, N>
(a);
48
}
49
50
template
<
class
R>
51
inline
span<typename detail::span_data<R>::type>
52
make_span
(R&& r)
53
{
54
return
span<typename detail::span_data<R>::type
>(std::forward<R>(r));
55
}
56
57
}
/* boost */
58
59
#endif
boost::span
Definition
span.hpp:159
boost
Definition
data.hpp:14
boost::make_span
constexpr span< I > make_span(I *f, std::size_t c) noexcept
Definition
make_span.hpp:17
span.hpp
include
aligator
third-party
boost
core
make_span.hpp
Generated by
1.11.0