gcc/testsuite/g++.dg/wrappers/cow-istream-string.C
raw| 1 | template<typename _CharT> |
| 2 | struct basic_string { |
| 3 | static const _CharT _S_terminal; |
| 4 | static void assign(const _CharT& __c2); |
| 5 | void _M_set_length_and_sharable() { |
| 6 | assign(_S_terminal); |
| 7 | } |
| 8 | }; |
| 9 | |
| 10 | template<typename _CharT> |
| 11 | const _CharT basic_string<_CharT>::_S_terminal = _CharT(); |
| 12 | |
| 13 | void getline(basic_string<char>& __str) { |
| 14 | __str._M_set_length_and_sharable(); |
| 15 | } |