From stdcxx-dev-return-6307-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Thu Nov 29 20:54:09 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 43947 invoked from network); 29 Nov 2007 20:54:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2007 20:54:09 -0000 Received: (qmail 26399 invoked by uid 500); 29 Nov 2007 20:53:56 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 26380 invoked by uid 500); 29 Nov 2007 20:53:56 -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 26356 invoked by uid 99); 29 Nov 2007 20:53:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2007 12:53:56 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2007 20:54:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3D9FA714238 for ; Thu, 29 Nov 2007 12:53:44 -0800 (PST) Message-ID: <16608507.1196369624250.JavaMail.jira@brutus> Date: Thu, 29 Nov 2007 12:53:44 -0800 (PST) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Issue Comment Edited: (STDCXX-375) std::getline() declared in , but should be declared in In-Reply-To: <13766376.1175016452199.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546884 ] farid edited comment on STDCXX-375 at 11/29/07 12:53 PM: ----------------------------------------------------------------- I've tried to declare the std::getline() in this testcase. The following test fails to compile in MSVC with error: error C2027: use of undefined type 'std::basic_istream<_CharT>' in line 16. ----------- #include #include namespace std { template basic_istream<_CharT, _Traits>& getline (basic_istream<_CharT, _Traits>&, basic_string<_CharT, _Traits, _Allocator>&); } void test (std::istream& is) { std::string str; std::getline (is, str); /// line 16 } ----------- But if I change the test() function to return the is, the test has compiled without errors. ----------- std::istream& test (std::istream& is) { std::string str; return std::getline (is, str); } ----------- was (Author: farid): I've tried to declare the std::getline() in this testcase. The following test fails to compile in MSVC with error: error C2027: use of undefined type 'std::basic_istream<_CharT>' in line 16. ----------- #include #include namespace std { template basic_istream<_CharT, _Traits>& getline (basic_istream<_CharT, _Traits>&, basic_string<_CharT, _Traits, _Allocator>&); } void test (std::istream& is) { std::string str; std::getline (is, str); } ----------- But if I change the test() function to return the is, the test has compiled without errors. ----------- std::istream& void test (std::istream& is) { std::string str; return std::getline (is, str); } ----------- > std::getline() declared in , but should be declared in > ------------------------------------------------------------------------ > > Key: STDCXX-375 > URL: https://issues.apache.org/jira/browse/STDCXX-375 > Project: C++ Standard Library > Issue Type: Bug > Components: 21. Strings > Affects Versions: 4.1.3, 4.1.4 > Environment: All > Reporter: Farid Zaripov > Fix For: 4.2.1 > > > The following code fails to compile with errors: > test.cpp(7) : error C2039: 'getline' : is not a member of 'std' > test.cpp(7) : error C3861: 'getline': identifier not found, even with argument-dependent lookup > test.cpp: > --------------------------- > #include > #include > void test (std::istream& is) > { > std::string str; > std::getline (is, str); > } > --------------------------- > The addition information here: http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200703.mbox/%3c7BDB2168BEAEF14C98F1901FD2DE6438594C10@epmsa009.minsk.epam.com%3e -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.