[libcxx-commits] [libcxx] r357512 - [libc++] Remove use of auto with actual type

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 2 12:20:48 PDT 2019


Author: ldionne
Date: Tue Apr  2 12:20:47 2019
New Revision: 357512

URL: http://llvm.org/viewvc/llvm-project?rev=357512&view=rev
Log:
[libc++] Remove use of auto with actual type

For compatibility with C++03.

Modified:
    libcxx/trunk/include/istream

Modified: libcxx/trunk/include/istream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/istream?rev=357512&r1=357511&r2=357512&view=diff
==============================================================================
--- libcxx/trunk/include/istream (original)
+++ libcxx/trunk/include/istream Tue Apr  2 12:20:47 2019
@@ -528,7 +528,7 @@ __input_c_string(basic_istream<_CharT, _
         typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
         if (__sen)
         {
-            auto __s = __p;
+            _CharT* __s = __p;
             const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
             ios_base::iostate __err = ios_base::goodbit;
             while (__s != __p + (__n-1))
@@ -568,7 +568,7 @@ inline _LIBCPP_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np])
 {
-    auto __n = _Np;
+    size_t __n = _Np;
     if (__is.width() > 0)
         __n = _VSTD::min(size_t(__is.width()), _Np);
     return _VSTD::__input_c_string(__is, __buf, __n);




More information about the libcxx-commits mailing list