Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
memcpy.hpp
Go to the documentation of this file.
1
// Copyright 2026, Toyota Motor Corporation
2
//
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5
#ifndef INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_MEMCPY_HPP_
6
#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_MEMCPY_HPP_
7
8
// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
9
// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
10
//
11
// IWYU pragma: private, include <cstring>
12
// IWYU pragma: friend "stdlib_detail/.*"
13
14
#include "
stdlib/include/stdlib_detail/cstddef.hpp
"
15
16
namespace
std
{
17
18
// parasoft-begin-suppress AUTOSAR-M17_0_3-a "This is an implementation of the standard library function"
19
// parasoft-begin-suppress CERT_CPP-DCL51-f "This is an implementation of the standard library function"
20
// parasoft-begin-suppress AUTOSAR-A7_1_1-a "This definition is required by the standard specification."
21
// parasoft-begin-suppress AUTOSAR-A7_1_5-a-2 "Trailing return syntax permitted by A7-1-5 Permit #1 v1.0.0"
22
// parasoft-begin-suppress AUTOSAR-A2_10_1-a "False positive: no 'count' becomes inaccessible due to this declaration"
23
24
/// @brief copies one buffer to another
25
/// @param dest destination buffer
26
/// @param src source buffer
27
/// @param count number of bytes to copy
28
/// @return pointer to the destination buffer
29
inline
auto
memcpy
(
void
* dest,
void
const
* src,
std::size_t
count) ->
void
* {
30
return
__builtin_memcpy(dest, src, count);
31
}
32
33
// parasoft-end-suppress AUTOSAR-A7_1_5-a-2
34
// parasoft-end-suppress AUTOSAR-A7_1_1-a
35
// parasoft-end-suppress CERT_CPP_DCL51-f
36
// parasoft-end-suppress AUTOSAR-M17_0_3-a
37
// parasoft-end-suppress AUTOSAR-A2_10_1-a
38
39
}
// namespace std
40
41
#endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_MEMCPY_HPP_
cstddef.hpp
std
STL namespace.
std::size_t
::size_t size_t
A type suitable for holding the size of an object.
Definition
cstddef.hpp:29
std::memcpy
auto memcpy(void *dest, void const *src, std::size_t count) -> void *
copies one buffer to another
Definition
memcpy.hpp:29
stdlib
include
stdlib_detail
memcpy.hpp
Generated by
1.13.2