aligator
0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
data.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_DATA_HPP
9
#define BOOST_CORE_DATA_HPP
10
11
#include <initializer_list>
12
#include <cstddef>
13
14
namespace
boost
{
15
16
template
<
class
C>
17
inline
constexpr
auto
18
data
(C& c)
noexcept
(
noexcept
(c.data())) ->
decltype
(c.data())
19
{
20
return
c.data();
21
}
22
23
template
<
class
C>
24
inline
constexpr
auto
25
data
(
const
C& c)
noexcept
(
noexcept
(c.data())) ->
decltype
(c.data())
26
{
27
return
c.data();
28
}
29
30
template
<
class
T, std::
size_t
N>
31
inline
constexpr
T*
32
data
(T(&a)[N])
noexcept
33
{
34
return
a;
35
}
36
37
template
<
class
T>
38
inline
constexpr
const
T*
39
data
(std::initializer_list<T> l)
noexcept
40
{
41
return
l.begin();
42
}
43
44
}
/* boost */
45
46
#endif
boost
Definition
data.hpp:14
boost::data
constexpr auto data(C &c) noexcept(noexcept(c.data())) -> decltype(c.data())
Definition
data.hpp:18
include
aligator
third-party
boost
core
data.hpp
Generated by
1.11.0