<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Tomek,<br>
<br>
your code is in C++11 style.<br>
C++11 is supported in Studio compiler starting from 12.4.<br>
with -std=c++11 gnu's C++ library is used by studio and pos is 0.<br>
<br>
Thanks,<br>
Vladimir.<br>
<br>
<div class="moz-cite-prefix">On 04.06.2015 00:16, Tomasz Mikolajczyk
wrote:<br>
</div>
<blockquote
cite="mid:CAAnoKN-1ezfeS7dF1dTkJbVEfAnre_Z1y5WkBQpa1CLZMF-JLQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Vladimir,
<div><br>
</div>
<div>It is already a few years that I do not work for that
company and I do not remember the exact version of the
product. I think it was sunpro either 11 or 12. Also it may
depend on the underlying std library you use. I remember that
the default one - the rogue wave implementation (<a
moz-do-not-send="true"
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__docs.roguewave.com_legacy-2Dhpp_stdref_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=K8vZq7WuwzH66QRihbkqouP0EHefzINWsPOh4D77KYw&s=AGcTc_IIa4IjjQ4aDI5bx3oWksF_a3KhS71uTw3Aods&e=">http://docs.roguewave.com/legacy-hpp/stdref/</a>)
had some serious issues and it was necessary to switch to
stlport (there was a dedicated compiler flag). I think that
stlport was returning npos as a result of such searching.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Tomek</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jun 3, 2015 at 8:38 PM,
Vladimir Voskresensky - Oracle <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:vladimir.voskresensky@oracle.com"
target="_blank">vladimir.voskresensky@oracle.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span class=""> <br>
<div>On 06/ 2/15 05:51 PM, Tomasz Mikolajczyk wrote:<br>
</div>
</span>
<div>
<div class="h5">
<blockquote 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>
</div>
</div>
In the latest SunPRO 12.4 pos is 0 as well.<span
class="HOEnZb"><font color="#888888"><br>
<br>
Vladimir.</font></span><span class=""><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards,</div>
<div>Tomek</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
cfe-dev mailing list
<a moz-do-not-send="true" href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>
<a moz-do-not-send="true" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</span></div>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev"
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
<br>
</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>