Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 88213 invoked from network); 28 Feb 2006 01:35:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Feb 2006 01:35:34 -0000 Received: (qmail 97651 invoked by uid 500); 28 Feb 2006 01:35:34 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 97602 invoked by uid 500); 28 Feb 2006 01:35:34 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 97589 invoked by uid 99); 28 Feb 2006 01:35:34 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2006 17:35:22 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id C9FE2DE for ; Tue, 28 Feb 2006 02:34:55 +0100 (CET) Message-ID: <1261542714.1141090495825.JavaMail.jira@ajax.apache.org> Date: Tue, 28 Feb 2006 02:34:55 +0100 (CET) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Resolved: (STDCXX-121) std::search_n() assumes Size can be incremented In-Reply-To: <1691602896.1137507642222.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/STDCXX-121?page=all ] Martin Sebor resolved STDCXX-121: --------------------------------- Fix Version: 4.1.4 Resolution: Fixed Fixed with the referenced change. > std::search_n() assumes Size can be incremented > ----------------------------------------------- > > Key: STDCXX-121 > URL: http://issues.apache.org/jira/browse/STDCXX-121 > Project: C++ Standard Library > Type: Bug > Components: 25. Algorithms > Versions: 4.1.2, 4.1.3 > Environment: all > Reporter: Anton Pevtsov > Assignee: Martin Sebor > Priority: Minor > Fix For: 4.1.4 > > $ cat t.cpp && make t > #include > struct Size > { > operator int() { return 0; } > private: > void operator=(Size&); > }; > template int* std::search_n(int*, int*, Size, const int&, int (*)(int, int)); > int main() { return 0; } > ./include/algorithm.cc: In function '_FwdIter std::__search_n(_FwdIter, _FwdIter, _Dist*, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Dist = int, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]': > ./include/algorithm:304: instantiated from '_FwdIter std::search_n(_FwdIter, _FwdIter, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]' > t.cpp:11: instantiated from here > ./include/algorithm.cc:303: error: conversion from 'int' to non-scalar type 'Size' requested > ./include/algorithm.cc:311: error: no match for 'operator=' in '__matches = 0' > t.cpp:8: note: candidates are: void Size::operator=(Size&) > ./include/algorithm.cc:315: error: no match for 'operator++' in '++__matches' > make: *** [t.o] Error 1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira