Upgrade <ratio> to use template aliases when available.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132342 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/ratio b/include/ratio
index 7369ccf..9764014 100644
--- a/include/ratio
+++ b/include/ratio
@@ -274,10 +274,19 @@
         >::type type;
 };
 
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+template <class _R1, class _R2> using ratio_multiply
+                                    = typename __ratio_multiply<_R1, _R2>::type;
+
+#else  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct _LIBCPP_VISIBLE ratio_multiply
     : public __ratio_multiply<_R1, _R2>::type {};
 
+#endif  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct __ratio_divide
 {
@@ -292,10 +301,19 @@
         >::type type;
 };
 
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+template <class _R1, class _R2> using ratio_divide
+                                      = typename __ratio_divide<_R1, _R2>::type;
+
+#else  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct _LIBCPP_VISIBLE ratio_divide
     : public __ratio_divide<_R1, _R2>::type {};
 
+#endif  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct __ratio_add
 {
@@ -318,10 +336,19 @@
         >::type type;
 };
 
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+template <class _R1, class _R2> using ratio_add
+                                         = typename __ratio_add<_R1, _R2>::type;
+
+#else  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct _LIBCPP_VISIBLE ratio_add
     : public __ratio_add<_R1, _R2>::type {};
 
+#endif  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct __ratio_subtract
 {
@@ -344,10 +371,19 @@
         >::type type;
 };
 
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+template <class _R1, class _R2> using ratio_subtract
+                                    = typename __ratio_subtract<_R1, _R2>::type;
+
+#else  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 template <class _R1, class _R2>
 struct _LIBCPP_VISIBLE ratio_subtract
     : public __ratio_subtract<_R1, _R2>::type {};
 
+#endif  // _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
 // ratio_equal
 
 template <class _R1, class _R2>