aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/char_traits.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/char_traits.h')
-rw-r--r--libstdc++-v3/include/bits/char_traits.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h
index a4b4e3a0d64..d01db93be49 100644
--- a/libstdc++-v3/include/bits/char_traits.h
+++ b/libstdc++-v3/include/bits/char_traits.h
@@ -43,7 +43,7 @@
#pragma GCC system_header
-#include <bits/stl_algobase.h> // For copy, fill_n
+#include <bits/stl_algobase.h> // std::copy, std::fill_n
#include <bits/postypes.h> // For streampos
#include <cstdio> // For EOF
#include <cwchar> // For WEOF, wmemmove, wmemset, etc.
@@ -60,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* types, but who don't need to change the definitions of any function
* defined in char_traits, can specialize __gnu_cxx::_Char_types
* while leaving __gnu_cxx::char_traits alone. */
- template <class _CharT>
+ template<typename _CharT>
struct _Char_types
{
typedef unsigned long int_type;
@@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* right, but the int_type and state_type typedefs, and the eof()
* member function, are likely to be wrong.) The reason this class
* exists is so users can specialize it. Classes in namespace std
- * may not be specialized for fundamentl types, but classes in
+ * may not be specialized for fundamental types, but classes in
* namespace __gnu_cxx may be.
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5
@@ -194,6 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
char_traits<_CharT>::
copy(char_type* __s1, const char_type* __s2, std::size_t __n)
{
+ // NB: Inline std::copy so no recursive dependencies.
std::copy(__s2, __s2 + __n, __s1);
return __s1;
}
@@ -203,6 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
char_traits<_CharT>::
assign(char_type* __s, std::size_t __n, char_type __a)
{
+ // NB: Inline std::fill_n so no recursive dependencies.
std::fill_n(__s, __n, __a);
return __s;
}