From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8073 invoked by alias); 10 Jun 2007 08:57:41 -0000 Received: (qmail 8027 invoked by uid 48); 10 Jun 2007 08:57:32 -0000 Date: Sun, 10 Jun 2007 08:57:00 -0000 Message-ID: <20070610085732.8026.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/31970] set<>::iterator vs type-safety In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "chris at bubblescope dot net" 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 X-SW-Source: 2007-06/txt/msg00673.txt.bz2 ------- Comment #8 from chris at bubblescope dot net 2007-06-10 08:57 ------- Hmm.. I thought I did have a good example, I had a function that looked like: template int count_unique(It begin, It end) { set counter(begin, end); return counter.size(); } But, while you might get multiple copies of this function for each iterator type, the "work parts" (the building of the set and the call to size()) will be the same regardless of if this is fixed. The only good example I can come up with would be if someone decided to build multiple maps of set::iterators, which I've never wanted to do... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31970