OSDN Git Service

2011-02-16 Jonathan Wakely <jwakely.gcc@gmail.com>
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Feb 2011 22:29:15 +0000 (22:29 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Feb 2011 22:29:15 +0000 (22:29 +0000)
* include/bits/regex.h (match_results::format): Use char_traits.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170225 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex.h

index 077372c..3e606d2 100644 (file)
@@ -1,3 +1,7 @@
+2011-02-16  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/bits/regex.h (match_results::format): Use char_traits.
+
 2011-02-16  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/std/atomic: Remove atomic_address, uplift to N3225.
index 627bdc0..18cd882 100644 (file)
@@ -1758,7 +1758,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
             = regex_constants::format_default) const
       {
         string_type __result;
-        format(std::back_inserter(__result), __fmt + __builtin_strlen(__fmt),
+        format(std::back_inserter(__result),
+               __fmt + char_traits<char_type>::length(__fmt),
                __flags);
         return __result;
       }