1/* { dg-do compile } */ 2/* { dg-require-profiling "-fprofile-generate" } */ 3/* { dg-options "-fprofile-generate" } */ 4 5template<class _CharT> struct char_traits; 6template<typename _OI> 7_OI __copy_move_a2(_OI __result); 8template<typename _OI> inline _OI 9copy(_OI __result) 10{ 11 return __copy_move_a2 (__result); 12} 13template<typename _CharT, typename _Traits> 14class basic_ostream { }; 15template<typename _Tp, typename _CharT = char, typename _Traits = char_traits<_CharT> > 16class ostream_iterator { 17 typedef basic_ostream<_CharT, _Traits> ostream_type; 18 ostream_type* _M_stream; 19 const _CharT* _M_string; 20public: 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}; 26int f(void) 27{ 28 basic_ostream<char, char_traits<char> > os; 29 copy(ostream_iterator<const int>(os, ",")); 30} 31