<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 06/ 2/15 05:51 PM, Tomasz
Mikolajczyk wrote:<br>
</div>
<blockquote
cite="mid:CAAnoKN_o_kUqMXYSTQ-qF82yThJM4oZef+AZSfXn3MkEJtYChg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
What should be the value of a pos variable in the following
piece of code?<br>
<br>
auto pos = std::string().find("");<br>
<br>
</div>
<div>I couldn't find answer to that and noticed it varies
between standard library implementations. For most I've
checked pos is 0 (libstdc++, libcxx, msvc). I noticed it is
npos for Oracle Solaris SunPRO. I think that both results are
explainable. Is it an UB?</div>
</div>
</blockquote>
In the latest SunPRO 12.4 pos is 0 as well.<br>
<br>
Vladimir.<br>
<br>
<blockquote
cite="mid:CAAnoKN_o_kUqMXYSTQ-qF82yThJM4oZef+AZSfXn3MkEJtYChg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards,</div>
<div>Tomek</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>