This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] regex undefinitions


2009/1/6 Benjamin Kosnik:
>
> Consistent removal of function definitions for things marked
> unimplemented or to-do in <regex>. Then, change the existing
> dg-do link test cases to dg-do compile. Clearly, when more of this is
> implemented the testcases with execute components (ie, anything with
> VERIFY) should be dg-do run as per usual.

I know it's a bit pointless fixing something that you've just
disabled, but I've had this in my tree for a while.

        * include/tr1_impl/regex: Fix bad return statements and typos.

> tested x86_64/linux

Ditto. OK to commit?

Jonathan
Index: include/tr1_impl/regex
===================================================================
--- include/tr1_impl/regex	(revision 143133)
+++ include/tr1_impl/regex	(working copy)
@@ -554,9 +554,9 @@ namespace regex_constants
         string_type
         lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const;
 
       /**
-       * @brief Maps one or mire characters to a named character
+       * @brief Maps one or more characters to a named character
        *        classification.
        *
        * @param first beginning of the character sequence.
        * @param last  one-past-the-end of the character sequence.
@@ -1066,9 +1066,9 @@ namespace regex_constants
   template<typename _Ch_type, typename _Rx_traits>
     inline void
     swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
 	 basic_regex<_Ch_type, _Rx_traits>& __rhs)
-    { return __lhs.swap(__rhs); }
+    { __lhs.swap(__rhs); }
 
 
   // [7.9] Class template sub_match
   /**
@@ -1816,8 +1816,9 @@ namespace regex_constants
       operator=(const match_results& __rhs)
       {
 	match_results __tmp(__rhs);
 	this->swap(__tmp);
+	return *this;
       }
 
       /**
        * @brief Destroys a %match_results object.
@@ -1879,9 +1880,9 @@ namespace regex_constants
       /**
        * @brief Gets the offset of the beginning of the indicated submatch.
        * @param sub indicates the submatch.
        *
-       * This function returns the offset from the beginnig of the target
+       * This function returns the offset from the beginning of the target
        * sequence to the beginning of the submatch, unless the value of @p sub
        * is zero (the default), in which case this function returns the offset
        * from the beginning of the target sequence to the beginning of the
        * match.
@@ -2082,9 +2083,9 @@ namespace regex_constants
   template<typename _Bi_iter, typename _Allocator>
     inline void
     swap(match_results<_Bi_iter, _Allocator>& __lhs,
 	 match_results<_Bi_iter, _Allocator>& __rhs)
-    { return __lhs.swap(__rhs); }
+    { __lhs.swap(__rhs); }
 
   // [7.11.2] Function template regex_match
   /**
    * @name Matching, Searching, and Replacing

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]