aligator
0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Toggle main menu visibility
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 "
aligator/third-party/boost/core/span.hpp
"
12
13
namespace
boost {
14
15
template
<
class
I>
16
inline
constexpr
span<I> make_span(I *f, std::size_t c)
noexcept
{
17
return
span<I>(f, c);
18
}
19
20
template
<
class
I>
inline
constexpr
span<I> make_span(I *f, I *l)
noexcept
{
21
return
span<I>(f, l);
22
}
23
24
template
<
class
T, std::
size_t
N>
25
inline
constexpr
span<T, N> make_span(T (&a)[N])
noexcept
{
26
return
span<T, N>(a);
27
}
28
29
template
<
class
T, std::
size_t
N>
30
inline
constexpr
span<T, N> make_span(std::array<T, N> &a)
noexcept
{
31
return
span<T, N>(a);
32
}
33
34
template
<
class
T, std::
size_t
N>
35
inline
constexpr
span<const T, N>
36
make_span(
const
std::array<T, N> &a)
noexcept
{
37
return
span<const T, N>(a);
38
}
39
40
template
<
class
R>
41
inline
span<typename detail::span_data<R>::type> make_span(R &&r) {
42
return
span<typename detail::span_data<R>::type>(std::forward<R>(r));
43
}
44
45
}
// namespace boost
46
47
#endif
span.hpp
include
aligator
third-party
boost
core
make_span.hpp
Generated by
1.17.0