[libc++] Move preferred_name declarations into the forward declaring headers and add pmr preferred names

We currently define the preferred names in multiple places. `basic_string` and `basic_string_view` also have a lot of aliases, which makes the declarations quite long. So let's only add the preferred names in forward-declaring headers to make the implementation more readable and have all the preferred names in one place.

Reviewed By: ldionne

Spies: EricWF, krytarowski, libcxx-commits

Differential Revision: https://reviews.llvm.org/D135824

NOKEYCHECK=True
GitOrigin-RevId: 627465cf9fa71ac1933986c20b32d6842a5b2678
diff --git a/include/regex b/include/regex
index d45f6c1..91a10fe 100644
--- a/include/regex
+++ b/include/regex
@@ -6845,9 +6845,12 @@
 using match_results = std::match_results<_BidirT, polymorphic_allocator<std::sub_match<_BidirT>>>;
 
 using cmatch  = match_results<const char*>;
-using wcmatch = match_results<const wchar_t*>;
 using smatch  = match_results<std::pmr::string::const_iterator>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+using wcmatch = match_results<const wchar_t*>;
 using wsmatch = match_results<std::pmr::wstring::const_iterator>;
+#endif
 } // namespace pmr
 _LIBCPP_END_NAMESPACE_STD
 #endif