This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Overload std::getline for rvalue streams


On 12/08/14 16:20 +0100, Jonathan Wakely wrote:
We're missing these overloads required by C++11.

Tested x86_64-linux, committed to trunk.

I missed an 'inline' on one of the new overloads, fixed by this patch,
which I'll commit once testing finishes.

commit 64240d493d1d72f78538d8bb06445d3ccb7a49b2
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Aug 12 16:33:03 2014 +0100

    	* include/bits/basic_string.h (getline): Declare inline.

diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 6a54d0c..93ceb6d 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -2816,7 +2816,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus >= 201103L
   /// Read a line from an rvalue stream into a string.
   template<typename _CharT, typename _Traits, typename _Alloc>
-    basic_istream<_CharT, _Traits>&
+    inline basic_istream<_CharT, _Traits>&
     getline(basic_istream<_CharT, _Traits>&& __is,
 	    basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
     { return std::getline(__is, __str, __delim); }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]