diff mbox

Overload std::getline for rvalue streams

Message ID 20140812153828.GT6927@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely Aug. 12, 2014, 3:38 p.m. UTC
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.
diff mbox

Patch

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); }