comparison gcc/testsuite/g++.dg/torture/pr39732.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-require-profiling "-fprofile-generate" } */
3 /* { dg-options "-fprofile-generate" } */
4
5 template<class _CharT> struct char_traits;
6 template<typename _OI>
7 _OI __copy_move_a2(_OI __result);
8 template<typename _OI> inline _OI
9 copy(_OI __result)
10 {
11 return __copy_move_a2 (__result);
12 }
13 template<typename _CharT, typename _Traits>
14 class basic_ostream { };
15 template<typename _Tp, typename _CharT = char, typename _Traits = char_traits<_CharT> >
16 class ostream_iterator {
17 typedef basic_ostream<_CharT, _Traits> ostream_type;
18 ostream_type* _M_stream;
19 const _CharT* _M_string;
20 public:
21 ostream_iterator(ostream_type& __s, const _CharT* __c)
22 : _M_stream(&__s), _M_string(__c) { }
23 ostream_iterator(const ostream_iterator& __obj)
24 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
25 };
26 int f(void)
27 {
28 basic_ostream<char, char_traits<char> > os;
29 copy(ostream_iterator<const int>(os, ","));
30 }