<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 15, 2017, at 19:42, Eric Fiselier <<a href="mailto:eric@efcs.ca" class="">eric@efcs.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Thu, Jun 15, 2017 at 8:38 PM, Duncan P. N. Exon Smith<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:dexonsmith@apple.com" target="_blank" class="">dexonsmith@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">I just started working on a patch to add #if guards, and the first interesting thing I found was the basic_string constructor:<div class=""><br class=""></div><div class=""><div class=""></div><blockquote type="cite" class=""><span class=""><div class="">template <class _CharT, class _Traits, class _Allocator></div></span><div class="">template <class _Tp></div><div class="">basic_string<_CharT, _Traits, _Allocator>::basic_string(</div><div class="">             const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a,</div><div class=""><span class="m_8776782733827039247Apple-tab-span" style="white-space: pre-wrap;">                  </span><span class="Apple-converted-space"> </span>typename enable_if<__can_be_converted_<wbr class="">to_string_view<_CharT, _Traits, _Tp>::value, void>::type *)</div><div class="">   <span class="Apple-converted-space"> </span>: __r_(__second_tag(), __a)</div><div class="">{</div><div class=""><span class="m_8776782733827039247Apple-tab-span" style="white-space: pre-wrap;">        </span>__self_view __sv = __self_view(__t).substr(__pos, __n);</div><div class="">   <span class="Apple-converted-space"> </span>__init(__sv.data(), __sv.size());</div><div class="">#if _LIBCPP_DEBUG_LEVEL >= 2</div><div class="">   <span class="Apple-converted-space"> </span>__get_db()->__insert_c(this);</div><div class="">#endif</div><div class="">}</div></blockquote><div class=""><br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">That constructor was added in C++17, so removing it along with string_view should be OK.</div><div class="">Assuming we don't use it to implement older constructors using a single template.</div><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><div class=""></div><div class="">I suppose the decision was made so that std::string could take advantage of it.</div><div class=""><br class=""></div><div class="">Is it a conforming extension?</div></div></div></blockquote><div class=""><br class=""></div><div class="">No, because it can change the meaning of otherwise well defined code, as you pointed out initially. </div></div></div></blockquote><div><br class=""></div><div>Let me know if this patch is along the right lines.  If so, I'll finish it up and put it on phab.</div><div><br class=""></div><div>experimental/filesystem/path.cpp doesn't compile, since experimental/filesystem uses things like operator+=(string, string_view) extensively.  But I'd like an early opinion on the approach before I dig in.</div><div><br class=""></div><div>In string, the only function that needed to be rewritten was string::compare(size, size, string, size, size).  I'm nervous that filesystem will be a bigger job.</div><div><br class=""></div><div></div></div></body></html>