On 03/24/2013 10:35 AM, Kinkie wrote: > digging up some documentation for the inconsistent behavior of > std::string::find() in GCC, it appears that its behavior is undefined > if the pos parameter is std::string::npos.
> I'd like to define that behavior by making it explicit in the API that > SBuf::find (in any variant) when called with pos=SBuf::npos will > return SBuf::npos. This is consistent with recent gcc, but not with > the current implementation If the standard says the behavior is undefined, we should mimic what GCC implementation does. If GCC versions are inconsistent in this regard, your suggestion sounds good to me, especially if it matches latest GCC implementations. Please note that you may need to adjust test cases to accommodate this change if we want them to pass on all supported GCC versions and those versions are inconsistent. Thank you, Alex.
