aligator  0.6.1
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/*
2Copyright 2023 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed 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
13namespace boost {
14
15template<class I>
16inline constexpr span<I>
17make_span(I* f, std::size_t c) noexcept
18{
19 return span<I>(f, c);
20}
21
22template<class I>
23inline constexpr span<I>
24make_span(I* f, I* l) noexcept
25{
26 return span<I>(f, l);
27}
28
29template<class T, std::size_t N>
30inline constexpr span<T, N>
31make_span(T(&a)[N]) noexcept
32{
33 return span<T, N>(a);
34}
35
36template<class T, std::size_t N>
37inline constexpr span<T, N>
38make_span(std::array<T, N>& a) noexcept
39{
40 return span<T, N>(a);
41}
42
43template<class T, std::size_t N>
44inline constexpr span<const T, N>
45make_span(const std::array<T, N>& a) noexcept
46{
47 return span<const T, N>(a);
48}
49
50template<class R>
51inline span<typename detail::span_data<R>::type>
53{
54 return span<typename detail::span_data<R>::type>(std::forward<R>(r));
55}
56
57} /* boost */
58
59#endif
Definition data.hpp:14
constexpr span< I > make_span(I *f, std::size_t c) noexcept
Definition make_span.hpp:17