* config/abi/pre/gnu.ver: Adjust basic_ostream exports.
* include/std/istream (basic_iostream(basic_iostream&&)): Pass *this
to ostream constructor.
* include/std/ostream (basic_ostream(basic_iostream*)): Change to take
parameter by reference, to avoid ambiguity.
* testsuite/27_io/basic_ostream/cons/char/null.cc: New.
From-SVN: r215510
+2014-09-23 Jonathan Wakely <jwakely@redhat.com>
+
+ * config/abi/pre/gnu.ver: Adjust basic_ostream exports.
+ * include/std/istream (basic_iostream(basic_iostream&&)): Pass *this
+ to ostream constructor.
+ * include/std/ostream (basic_ostream(basic_iostream*)): Change to take
+ parameter by reference, to avoid ambiguity.
+ * testsuite/27_io/basic_ostream/cons/char/null.cc: New.
+
2014-09-22 Jason Merrill <jason@redhat.com>
* testsuite/Makefile.am (%/site.exp): Add @.
_ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEaSEOS3_;
_ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEC[12]EOS3_;
- # basic_ostream<C,T>::basic_ostream(basic_iostream<C,T>*)
- _ZNSoC[12]EPSd;
- _ZNSt13basic_ostreamIwSt11char_traitsIwEEC[12]EPSt14basic_iostreamIwS1_E;
+ # basic_ostream<C,T>::basic_ostream(basic_iostream<C,T>&)
+ _ZNSoC[12]ERSd;
+ _ZNSt13basic_ostreamIwSt11char_traitsIwEEC[12]ERSt14basic_iostreamIwS1_E;
} GLIBCXX_3.4.20;
basic_iostream(const basic_iostream&) = delete;
basic_iostream(basic_iostream&& __rhs)
- : __istream_type(std::move(__rhs)), __ostream_type(this)
+ : __istream_type(std::move(__rhs)), __ostream_type(*this)
{ }
// 27.7.3.3 Assign/swap
#if __cplusplus >= 201103L
// Non-standard constructor that does not call init()
- basic_ostream(basic_iostream<_CharT, _Traits>*) { }
+ basic_ostream(basic_iostream<_CharT, _Traits>&) { }
basic_ostream(const basic_ostream&) = delete;
--- /dev/null
+// Copyright (C) 2014 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <ostream>
+
+// https://gcc.gnu.org/ml/libstdc++/2014-09/msg00108.html
+struct O : std::ostream
+{
+ O() : std::ostream(NULL) { }
+ O(int) : std::ostream(nullptr) { }
+};
+
+O o;