<div dir="ltr"><div>Hi Marshall</div><div><br></div><div>Some early feed back for your patch:</div><div><br></div><div>1. string_view implements it's own __min function, but this is unfortunately a macro in mingw's stdlib.h</div>
<div><br></div><div>and therefore compilation yields these type of error's with clang++ and g++ using mingw:</div><div>----</div><div>/libcxx/include\string_view:181:18: error: expected ')'<br> constexpr _T __min ( const _T& __t1, const _T& __t2 )</div>
<div><br></div><div> ^<br>c:\mingw\bin\..\lib\clang\3.5\../../../x86_64-w64-mingw32/include\stdlib.h:113:26: note: expanded from macro '__min'<br>#define __min(a,b) (((a) < (b)) ? (a) : (b))<br>
</div><div>----</div><div><br></div><div>Changing __min to ___min which allowed it to compile for me.<br> ^</div><div><br></div><div>2. With the above change in place, I find I c++1y is required. Makes sense, but using string_view without a c++1y compiler might be a worthwhile consideration if it's easy.</div>
<div><br></div><div>/libcxx/include\string_view:241:13: warning: use of this statement in a constexpr function is a C++1y extension<br> [-Wc++1y-extensions]<br> if (__pos >= size ())<br> ^<br>
/libcxx/include\string_view:292:23: warning: variable declaration in a constexpr function is a C++1y extension<br> [-Wc++1y-extensions]<br> size_type rlen_ = ____min ( __n, size() - __pos );<br> ^<br>
/libcxx/include\string_view:290:13: warning: use of this statement in a constexpr function is a C++1y extension<br> [-Wc++1y-extensions]<br> if (__pos > size())</div><div><br></div><div>3. g++ reports this:</div>
<div>--</div><div>In file included from sv.cpp:1:0:<br>/libcxx/include/string_view:199:53: error: declaration of 'typedef std::experimental::__library_fundamentals::basic_strin<br>_view<_CharT, _Traits>::const_reverse_iterator std::experimental::__library_fundamentals::basic_string_view<_CharT, _Trai<br>
s>::reverse_iterator' [-fpermissive]<br> typedef const_reverse_iterator reverse_iterator;<br> ^<br>In file included from /libcxx/include/memory:600:0,<br>
from /libcxx/include/algorithm:627,<br> from /libcxx/include/string:439,<br> from /libcxx/include/string_view:173,<br> from sv.cpp:1:<br>/libcxx/include/iterator:529:29: error: changes meaning of 'reverse_iterator' from 'class std::__1::reverse_iterator<cons<br>
_CharT*>' [-fpermissive]<br> class _LIBCPP_TYPE_VIS_ONLY reverse_iterator</div><div>--</div><div>I commented out line 199 and it compiled. i.e.:</div><div> //typedef const_reverse_iterator reverse_iterator;</div>
<div><br></div><div>That's it for now.</div><div><br></div><div>I couldn't reply directly to your original post on this subject because I couldn't find your post in my inbox, only on the archives list. I don't know how to get around that problem when it happens.</div>
<div><br></div><div>Hope this helps.<br></div></div>