Explicitly invoke the size_type specialization of max and min. This
avoids bugs where, when the allocator's size_type was smaller than int,
the multiplication or division would cause integral promotions and, with
two different integer types as arguments, deduction of the template
arguments would fail.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@136540 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/vector b/include/vector
index 2aebf5c..8d9b421 100644
--- a/include/vector
+++ b/include/vector
@@ -794,7 +794,7 @@
 typename vector<_Tp, _Allocator>::size_type
 vector<_Tp, _Allocator>::max_size() const _NOEXCEPT
 {
-    return _VSTD::min(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2);  // end() >= begin(), always
+    return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2);  // end() >= begin(), always
 }
 
 //  Precondition:  __new_size > capacity()
@@ -809,7 +809,7 @@
     const size_type __cap = capacity();
     if (__cap >= __ms / 2)
         return __ms;
-    return _VSTD::max(2*__cap, __new_size);
+    return _VSTD::max<size_type>(2*__cap, __new_size);
 }
 
 //  Default constructs __n objects starting at __end_