tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
memmove.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CSTRING_MEMMOVE_HPP
4#define TETL_CSTRING_MEMMOVE_HPP
5
9
10namespace etl {
11
15inline auto memmove(void* dest, void const* src, etl::size_t count) -> void*
16{
17 TETL_PRECONDITION(dest != nullptr);
18 TETL_PRECONDITION(src != nullptr);
19#if defined(__clang__)
20 return __builtin_memmove(dest, src, count);
21#else
22 return etl::detail::memmove<unsigned char>(dest, src, count);
23#endif
24}
25
26} // namespace etl
27#endif // TETL_CSTRING_MEMMOVE_HPP
#define TETL_PRECONDITION(...)
Definition check.hpp:16
constexpr auto count(InputIt first, InputIt last, T const &value) -> typename iterator_traits< InputIt >::difference_type
Returns the number of elements in the range [first, last) satisfying specific criteria....
Definition count.hpp:21
auto memmove(void *dest, void const *src, etl::size_t count) -> void *
Copy the first n bytes pointed to by src to the buffer pointed to by dest. Source and destination may...
Definition memmove.hpp:15
Definition adjacent_find.hpp:8
TETL_BUILTIN_SIZET size_t
etl::size_t is the unsigned integer type of the result of the sizeof operator.
Definition size_t.hpp:14