/*============================================================================= Copyright (c) 2011-2018 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_CSTRING_MEMCPY_HPP #define SPROUT_CSTRING_MEMCPY_HPP #include #include #include #include #include namespace sprout { namespace detail { template inline SPROUT_CXX14_CONSTEXPR PtrIterator memcpy(PtrIterator s1, ConstPtrIterator s2, std::size_t n) { sprout::copy(s2, s2 + n, s1); return s1; } } // namespace detail // 7.21.2.1 The memcpy function // template< typename T, typename CT, typename sprout::enabler_if::value && std::is_convertible::value>::type = sprout::enabler > inline SPROUT_CXX14_CONSTEXPR void* memcpy(T s1, CT s2, std::size_t n) { return sprout::detail::memcpy(static_cast(s1), static_cast(s2), n); } } // namespace sprout #endif // #ifndef SPROUT_CSTRING_MEMCPY_HPP