Replace identifiers called `__out` because Windows.h #defines it.

Windows is greedy and it defines the identifier `__out` as a macro.
This patch renames all conflicting libc++ identifiers in order
to correctly work on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291345 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/regex b/include/regex
index d8f1fae..42e55e8 100644
--- a/include/regex
+++ b/include/regex
@@ -5262,15 +5262,15 @@
     // format:
     template <class _OutputIter>
         _OutputIter
-        format(_OutputIter __out, const char_type* __fmt_first,
+        format(_OutputIter __output, const char_type* __fmt_first,
                const char_type* __fmt_last,
                regex_constants::match_flag_type __flags = regex_constants::format_default) const;
     template <class _OutputIter, class _ST, class _SA>
         _LIBCPP_INLINE_VISIBILITY
         _OutputIter
-        format(_OutputIter __out, const basic_string<char_type, _ST, _SA>& __fmt,
+        format(_OutputIter __output, const basic_string<char_type, _ST, _SA>& __fmt,
                regex_constants::match_flag_type __flags = regex_constants::format_default) const
-            {return format(__out, __fmt.data(), __fmt.data() + __fmt.size(), __flags);}
+            {return format(__output, __fmt.data(), __fmt.data() + __fmt.size(), __flags);}
     template <class _ST, class _SA>
         _LIBCPP_INLINE_VISIBILITY
         basic_string<char_type, _ST, _SA>
@@ -5382,7 +5382,7 @@
 template <class _BidirectionalIterator, class _Allocator>
 template <class _OutputIter>
 _OutputIter
-match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __out,
+match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output,
         const char_type* __fmt_first, const char_type* __fmt_last,
         regex_constants::match_flag_type __flags) const
 {
@@ -5391,27 +5391,27 @@
         for (; __fmt_first != __fmt_last; ++__fmt_first)
         {
             if (*__fmt_first == '&')
-                __out = _VSTD::copy(__matches_[0].first, __matches_[0].second,
-                                   __out);
+                __output = _VSTD::copy(__matches_[0].first, __matches_[0].second,
+                                   __output);
             else if (*__fmt_first == '\\' && __fmt_first + 1 != __fmt_last)
             {
                 ++__fmt_first;
                 if ('0' <= *__fmt_first && *__fmt_first <= '9')
                 {
                     size_t __i = *__fmt_first - '0';
-                    __out = _VSTD::copy((*this)[__i].first,
-                                        (*this)[__i].second, __out);
+                    __output = _VSTD::copy((*this)[__i].first,
+                                        (*this)[__i].second, __output);
                 }
                 else
                 {
-                    *__out = *__fmt_first;
-                    ++__out;
+                    *__output = *__fmt_first;
+                    ++__output;
                 }
             }
             else
             {
-                *__out = *__fmt_first;
-                ++__out;
+                *__output = *__fmt_first;
+                ++__output;
             }
         }
     }
@@ -5424,21 +5424,21 @@
                 switch (__fmt_first[1])
                 {
                 case '$':
-                    *__out = *++__fmt_first;
-                    ++__out;
+                    *__output = *++__fmt_first;
+                    ++__output;
                     break;
                 case '&':
                     ++__fmt_first;
-                    __out = _VSTD::copy(__matches_[0].first, __matches_[0].second,
-                                       __out);
+                    __output = _VSTD::copy(__matches_[0].first, __matches_[0].second,
+                                       __output);
                     break;
                 case '`':
                     ++__fmt_first;
-                    __out = _VSTD::copy(__prefix_.first, __prefix_.second, __out);
+                    __output = _VSTD::copy(__prefix_.first, __prefix_.second, __output);
                     break;
                 case '\'':
                     ++__fmt_first;
-                    __out = _VSTD::copy(__suffix_.first, __suffix_.second, __out);
+                    __output = _VSTD::copy(__suffix_.first, __suffix_.second, __output);
                     break;
                 default:
                     if ('0' <= __fmt_first[1] && __fmt_first[1] <= '9')
@@ -5451,25 +5451,25 @@
                             ++__fmt_first;
                             __i = 10 * __i + *__fmt_first - '0';
                         }
-                        __out = _VSTD::copy((*this)[__i].first,
-                                            (*this)[__i].second, __out);
+                        __output = _VSTD::copy((*this)[__i].first,
+                                            (*this)[__i].second, __output);
                     }
                     else
                     {
-                        *__out = *__fmt_first;
-                        ++__out;
+                        *__output = *__fmt_first;
+                        ++__output;
                     }
                     break;
                 }
             }
             else
             {
-                *__out = *__fmt_first;
-                ++__out;
+                *__output = *__fmt_first;
+                ++__output;
             }
         }
     }
-    return __out;
+    return __output;
 }
 
 template <class _BidirectionalIterator, class _Allocator>
@@ -6459,7 +6459,7 @@
 template <class _OutputIterator, class _BidirectionalIterator,
           class _Traits, class _CharT>
 _OutputIterator
-regex_replace(_OutputIterator __out,
+regex_replace(_OutputIterator __output,
               _BidirectionalIterator __first, _BidirectionalIterator __last,
               const basic_regex<_CharT, _Traits>& __e, const _CharT* __fmt,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
@@ -6470,7 +6470,7 @@
     if (__i == __eof)
     {
         if (!(__flags & regex_constants::format_no_copy))
-            __out = _VSTD::copy(__first, __last, __out);
+            __output = _VSTD::copy(__first, __last, __output);
     }
     else
     {
@@ -6478,29 +6478,29 @@
         for (size_t __len = char_traits<_CharT>::length(__fmt); __i != __eof; ++__i)
         {
             if (!(__flags & regex_constants::format_no_copy))
-                __out = _VSTD::copy(__i->prefix().first, __i->prefix().second, __out);
-            __out = __i->format(__out, __fmt, __fmt + __len, __flags);
+                __output = _VSTD::copy(__i->prefix().first, __i->prefix().second, __output);
+            __output = __i->format(__output, __fmt, __fmt + __len, __flags);
             __lm = __i->suffix();
             if (__flags & regex_constants::format_first_only)
                 break;
         }
         if (!(__flags & regex_constants::format_no_copy))
-            __out = _VSTD::copy(__lm.first, __lm.second, __out);
+            __output = _VSTD::copy(__lm.first, __lm.second, __output);
     }
-    return __out;
+    return __output;
 }
 
 template <class _OutputIterator, class _BidirectionalIterator,
           class _Traits, class _CharT, class _ST, class _SA>
 inline _LIBCPP_INLINE_VISIBILITY
 _OutputIterator
-regex_replace(_OutputIterator __out,
+regex_replace(_OutputIterator __output,
               _BidirectionalIterator __first, _BidirectionalIterator __last,
               const basic_regex<_CharT, _Traits>& __e,
               const basic_string<_CharT, _ST, _SA>& __fmt,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    return _VSTD::regex_replace(__out, __first, __last, __e, __fmt.c_str(), __flags);
+    return _VSTD::regex_replace(__output, __first, __last, __e, __fmt.c_str(), __flags);
 }
 
 template <class _Traits, class _CharT, class _ST, class _SA, class _FST,