You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/08/28 17:59:30 UTC

[jira] Resolved: (STDCXX-272) [LWG #625] std::string::find_first_of() returns 0 for the empty string

     [ https://issues.apache.org/jira/browse/STDCXX-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov resolved STDCXX-272.
----------------------------------

    Resolution: Fixed

Yes. This issue is a part of the STDCXX-466 issue and fixed by patch for STDCXX-466.

> [LWG #625] std::string::find_first_of() returns 0 for the empty string
> ----------------------------------------------------------------------
>
>                 Key: STDCXX-272
>                 URL: https://issues.apache.org/jira/browse/STDCXX-272
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 21. Strings
>    Affects Versions: 4.1.2, 4.1.3
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Farid Zaripov
>             Fix For: 4.2
>
>
> The program below is expected to run succeffully to completion (since the returned value must be less than the size of the string) but instead it aborts.
> $ cat t.cpp && nice gmake t && ./t
> #include <cassert>
> #include <string>
> int main ()
> {
>     std::string::size_type xpos =
>         std::string ("").find_first_of ("cba", 0, std::string::npos);
>     assert (std::string::npos == xpos);
> }
> aCC -c -I/amd/devco/sebor/dev/stdlib/include/ansi -I/usr/include  -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.70-11d/include -I/amd/devco/sebor/dev/stdlib/examples/include  -Aa +nostl  -g +d  +w +W392 +W655 +W684 +W818 +W819 +W849  t.cpp
> aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/aCC-3.70-11d/lib    -L/build/sebor/aCC-3.70-11d/lib -lstd11d   -lm
> ABORT instruction (core dumped)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.