This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] char_traits error checking
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Phil Edwards <phil at jaj dot com>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 12 Mar 2002 12:00:00 -0800 (PST)
- Subject: Re: [v3] char_traits error checking
> In the above test the beg =3D=3D _InIter(0) test is almost never true. And
> even if it would be, the fast path is to not throw an exception.=20
> Therefore the if () expressions should be written like this:
>
> if (__builtin_expect (__beg =3D=3D _InIter(0), 0))
Yep. I'll do this, thanks for the suggestion.
At some point, the library code should be audited for this.
-benjamin