tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
wmemcpy.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CWCHAR_WMEMCPY_HPP
4#define TETL_CWCHAR_WMEMCPY_HPP
5
8
9namespace etl {
10
17constexpr auto wmemcpy(wchar_t* dest, wchar_t const* src, etl::size_t count) noexcept -> wchar_t*
18{
19#if defined(__clang__)
20 return __builtin_wmemcpy(dest, src, count);
21#else
22 if (count == 0) {
23 return dest;
24 }
25 return etl::detail::strncpy(dest, src, count);
26#endif
27}
28
29} // namespace etl
30
31#endif // TETL_CWCHAR_WMEMCPY_HPP
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
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
constexpr auto wmemcpy(wchar_t *dest, wchar_t const *src, etl::size_t count) noexcept -> wchar_t *
Copies exactly count successive wide characters from the wide character array pointed to by src to th...
Definition wmemcpy.hpp:17