<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 December 2016 at 03:28, Jared Grubb <span dir="ltr"><<a href="mailto:jared.grubb@gmail.com" target="_blank">jared.grubb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I've written code like this for a long while:<div><br></div><div><font face="Courier New">void foo(std::string const& str) {</font></div><div><font face="Courier New">  if (str.find("/") != str.npos) {</font></div><div><font face="Courier New"><span class="m_5886148180474586911Apple-tab-span" style="white-space:pre-wrap"> </span>...</font></div><div><font face="Courier New">  }</font></div><div><font face="Courier New">}</font></div><div><br></div><div>Is this considered weird style? I find "s.npos" much more usable that "std::string::npos" and in this one instance I would probably not enable your check.</div><div><br></div><div>Not to derail the conversation because I might be in the minority on this one!!</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Jared</font></span></div></div></blockquote><div> </div></div>Not at all a derailment. This is a great counterexample. I would not write code like this, but this is one of those cases where it can be idiomatic to some people.</div></div>