Revert "Add new 'preferred_name' attribute."

This change exposed a pre-existing issue with deserialization cycles
caused by a combination of attributes and template instantiations
violating the deserialization ordering restrictions; see PR48434 for
details.

A previous commit attempted to work around PR48434, but appears to have
only been a partial fix, and fixing this properly seems non-trivial.
Backing out for now to unblock things.

This reverts commit 98f76adf4e941738c0b9fe3b9965fa63603e9c89 and
commit a64c26a47a81b1b44e36d235ff3bc6a74a0bad9f.

GitOrigin-RevId: a1344779ab019a6bcd29842c1499343e15efbe87
diff --git a/include/regex b/include/regex
index 8578039..7c5b2fd 100644
--- a/include/regex
+++ b/include/regex
@@ -2534,17 +2534,7 @@
 template <class _CharT, class _Traits> class __lookahead;
 
 template <class _CharT, class _Traits = regex_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_regex;
-
-typedef basic_regex<char>    regex;
-typedef basic_regex<wchar_t> wregex;
-
-template <class _CharT, class _Traits>
-class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(regex)
-    _LIBCPP_PREFERRED_NAME(wregex)
-    basic_regex
+class _LIBCPP_TEMPLATE_VIS basic_regex
 {
 public:
     // types:
@@ -4889,21 +4879,13 @@
     __end_ = static_cast<__owns_one_state<_CharT>*>(__end_->first());
 }
 
+typedef basic_regex<char>    regex;
+typedef basic_regex<wchar_t> wregex;
+
 // sub_match
 
-typedef sub_match<const char*>             csub_match;
-typedef sub_match<const wchar_t*>          wcsub_match;
-typedef sub_match<string::const_iterator>  ssub_match;
-typedef sub_match<wstring::const_iterator> wssub_match;
-
 template <class _BidirectionalIterator>
-class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(csub_match)
-    _LIBCPP_PREFERRED_NAME(wcsub_match)
-    _LIBCPP_PREFERRED_NAME(ssub_match)
-    _LIBCPP_PREFERRED_NAME(wssub_match)
-    sub_match
+class _LIBCPP_TEMPLATE_VIS sub_match
     : public pair<_BidirectionalIterator, _BidirectionalIterator>
 {
 public:
@@ -4938,6 +4920,11 @@
         {return str().compare(__s);}
 };
 
+typedef sub_match<const char*>             csub_match;
+typedef sub_match<const wchar_t*>          wcsub_match;
+typedef sub_match<string::const_iterator>  ssub_match;
+typedef sub_match<wstring::const_iterator> wssub_match;
+
 template <class _BiIter>
 inline _LIBCPP_INLINE_VISIBILITY
 bool
@@ -5320,19 +5307,8 @@
     return __os << __m.str();
 }
 
-typedef match_results<const char*>             cmatch;
-typedef match_results<const wchar_t*>          wcmatch;
-typedef match_results<string::const_iterator>  smatch;
-typedef match_results<wstring::const_iterator> wsmatch;
-
 template <class _BidirectionalIterator, class _Allocator>
-class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(cmatch)
-    _LIBCPP_PREFERRED_NAME(wcmatch)
-    _LIBCPP_PREFERRED_NAME(smatch)
-    _LIBCPP_PREFERRED_NAME(wsmatch)
-    match_results
+class _LIBCPP_TEMPLATE_VIS match_results
 {
 public:
     typedef _Allocator                                        allocator_type;
@@ -5652,6 +5628,11 @@
     swap(__ready_, __m.__ready_);
 }
 
+typedef match_results<const char*>             cmatch;
+typedef match_results<const wchar_t*>          wcmatch;
+typedef match_results<string::const_iterator>  smatch;
+typedef match_results<wstring::const_iterator> wsmatch;
+
 template <class _BidirectionalIterator, class _Allocator>
 bool
 operator==(const match_results<_BidirectionalIterator, _Allocator>& __x,
@@ -6235,21 +6216,7 @@
 template <class _BidirectionalIterator,
           class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
           class _Traits = regex_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS regex_iterator;
-
-typedef regex_iterator<const char*>             cregex_iterator;
-typedef regex_iterator<const wchar_t*>          wcregex_iterator;
-typedef regex_iterator<string::const_iterator>  sregex_iterator;
-typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
-
-template <class _BidirectionalIterator, class _CharT, class _Traits>
-class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(cregex_iterator)
-    _LIBCPP_PREFERRED_NAME(wcregex_iterator)
-    _LIBCPP_PREFERRED_NAME(sregex_iterator)
-    _LIBCPP_PREFERRED_NAME(wsregex_iterator)
-    regex_iterator
+class _LIBCPP_TEMPLATE_VIS regex_iterator
 {
 public:
     typedef basic_regex<_CharT, _Traits>          regex_type;
@@ -6358,26 +6325,17 @@
     return *this;
 }
 
+typedef regex_iterator<const char*>             cregex_iterator;
+typedef regex_iterator<const wchar_t*>          wcregex_iterator;
+typedef regex_iterator<string::const_iterator>  sregex_iterator;
+typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
+
 // regex_token_iterator
 
 template <class _BidirectionalIterator,
           class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
           class _Traits = regex_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS regex_token_iterator;
-
-typedef regex_token_iterator<const char*>             cregex_token_iterator;
-typedef regex_token_iterator<const wchar_t*>          wcregex_token_iterator;
-typedef regex_token_iterator<string::const_iterator>  sregex_token_iterator;
-typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
-
-template <class _BidirectionalIterator, class _CharT, class _Traits>
-class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(cregex_token_iterator)
-    _LIBCPP_PREFERRED_NAME(wcregex_token_iterator)
-    _LIBCPP_PREFERRED_NAME(sregex_token_iterator)
-    _LIBCPP_PREFERRED_NAME(wsregex_token_iterator)
-    regex_token_iterator
+class _LIBCPP_TEMPLATE_VIS regex_token_iterator
 {
 public:
     typedef basic_regex<_CharT, _Traits>      regex_type;
@@ -6655,6 +6613,11 @@
     return *this;
 }
 
+typedef regex_token_iterator<const char*>             cregex_token_iterator;
+typedef regex_token_iterator<const wchar_t*>          wcregex_token_iterator;
+typedef regex_token_iterator<string::const_iterator>  sregex_token_iterator;
+typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
+
 // regex_replace
 
 template <class _OutputIterator, class _BidirectionalIterator,