* [v3] libstdc++/50336
@ 2011-09-09 4:38 Paolo Carlini
0 siblings, 0 replies; only message in thread
From: Paolo Carlini @ 2011-09-09 4:38 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++
[-- Attachment #1: Type: text/plain, Size: 88 bytes --]
Hi,
tested x86_64-linux, committed to mainline.
Thanks,
Paolo.
/////////////////////
[-- Attachment #2: CL_50336 --]
[-- Type: text/plain, Size: 250 bytes --]
2011-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/50336
* include/bits/streambuf_iterator.h (class istreambuf_iterator):
Implement LWG 445 in C++0x mode.
* testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc:
New.
[-- Attachment #3: patch_50336 --]
[-- Type: text/plain, Size: 1909 bytes --]
Index: include/bits/streambuf_iterator.h
===================================================================
--- include/bits/streambuf_iterator.h (revision 178712)
+++ include/bits/streambuf_iterator.h (working copy)
@@ -51,7 +51,13 @@
template<typename _CharT, typename _Traits>
class istreambuf_iterator
: public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
- _CharT*, _CharT&>
+ _CharT*,
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // LWG 445.
+ _CharT>
+#else
+ _CharT&>
+#endif
{
public:
// Types:
Index: testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc
===================================================================
--- testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc (revision 0)
+++ testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc (revision 0)
@@ -0,0 +1,27 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2011 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <iterator>
+
+using namespace std;
+
+// DR 445
+static_assert(is_same<istreambuf_iterator<char>::reference, char>::value, "");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-08 22:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 4:38 [v3] libstdc++/50336 Paolo Carlini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).