From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23244 invoked by alias); 16 Dec 2013 17:45:06 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23200 invoked by uid 48); 16 Dec 2013 17:45:02 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/59508] std::find could use specialized container's find Date: Mon, 16 Dec 2013 17:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg01407.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59508 --- Comment #6 from Oleg Endo --- (In reply to Jonathan Wakely from comment #5) > Users can specialize std::set::find to do something > different, e.g. write to a file, and it must not do that if they call > std::find. > > It's not a matter of whether the type is the library's iterator type or not. Right. If, then std::find should not invoke std::set::find (or std::map::find etc) but the library's internal function to search the rb tree. Of course users might still provide specializations of std::find for particular iterator types but that shouldn't be a problem I think.