add complex tuple and container support

This commit is contained in:
bolero-MURAKAMI 2014-07-10 17:08:33 +09:00
parent f4d715c6db
commit 54920b3389
11 changed files with 357 additions and 100 deletions

View file

@ -13,11 +13,11 @@
namespace sprout {
namespace detail {
template<typename OutputCStrIterator, typename CStrIterator>
inline SPROUT_CXX14_CONSTEXPR OutputCStrIterator
strncpy(OutputCStrIterator s1, CStrIterator s2, std::size_t n) {
typedef typename std::iterator_traits<OutputCStrIterator>::value_type value_type;
OutputCStrIterator result = s1;
template<typename OutputNullTerminatedIterator, typename NullTerminatedIterator>
inline SPROUT_CXX14_CONSTEXPR OutputNullTerminatedIterator
strncpy(OutputNullTerminatedIterator s1, NullTerminatedIterator s2, std::size_t n) {
typedef typename std::iterator_traits<OutputNullTerminatedIterator>::value_type value_type;
OutputNullTerminatedIterator result = s1;
while (n) {
--n;
if (!(*s1++ = *s2++)) {