In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented.

llvm-svn: 234296
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 1f508014df7da33d684a5c0cb3c059a675a0aacf
diff --git a/include/memory b/include/memory
index 43f8dba..93e8f67 100644
--- a/include/memory
+++ b/include/memory
@@ -1635,6 +1635,16 @@
             {return __a;}
 };
 
+template <class _Traits, class _Tp>
+struct __rebind_alloc_helper
+{
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+	typedef typename _Traits::template rebind_alloc<_Tp>        type;
+#else
+    typedef typename _Traits::template rebind_alloc<_Tp>::other type;
+#endif
+};
+
 // allocator
 
 template <class _Tp>