tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
data.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_ITERATOR_DATA_HPP
4
#define TETL_ITERATOR_DATA_HPP
5
6
namespace
etl
{
7
10
template
<
typename
C>
11
constexpr
auto
data
(C& c)
noexcept
(
noexcept
(c.data())) ->
decltype
(c.data())
12
{
13
return
c.data();
14
}
15
17
template
<
typename
C>
18
constexpr
auto
data
(C
const
& c)
noexcept
(
noexcept
(c.data())) ->
decltype
(c.data())
19
{
20
return
c.data();
21
}
22
24
template
<
typename
T,
size_t
N>
25
constexpr
auto
data
(T (&
array
)[N])
noexcept
-> T*
26
{
27
return
&
array
[0];
28
}
29
30
}
// namespace etl
31
32
#endif
// TETL_ITERATOR_DATA_HPP
etl::data
constexpr auto data(C &c) noexcept(noexcept(c.data())) -> decltype(c.data())
Returns a pointer to the block of memory containing the elements of the container.
Definition
data.hpp:11
etl
Definition
adjacent_find.hpp:8
etl::array
A container that encapsulates fixed size arrays.
Definition
array.hpp:48
include
etl
_iterator
data.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0