// POD character, std::char_traits specialization -*- C++ -*-
-// Copyright (C) 2002-2014 Free Software Foundation, Inc.
+// Copyright (C) 2002-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{
+ if (__n == 0)
+ return __s1;
return static_cast<char_type*>
(__builtin_memmove(__s1, __s2, __n * sizeof(char_type)));
}
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{
+ if (__n == 0)
+ return __s1;
std::copy(__s2, __s2 + __n, __s1);
return __s1;
}
static int_type
eof()
{
- int_type __r = { -1 };
+ int_type __r = { static_cast<typename __gnu_cxx::__conditional_type
+ <std::__is_integer<int_type>::__value,
+ int_type, int>::__type>(-1) };
return __r;
}