| 1 |
// { dg-additional-options "-Wno-analyzer-use-of-uninitialized-value" } |
| 2 |
|
| 3 |
template <typename> class allocator { |
| 4 |
public: |
| 5 |
allocator(const allocator &); |
| 6 |
allocator(); |
| 7 |
}; |
| 8 |
|
| 9 |
template <typename> struct allocator_traits; |
| 10 |
template <typename _Tp> struct allocator_traits<allocator<_Tp> > { |
| 11 |
static allocator<_Tp> select_on_container_copy_construction() { |
| 12 |
return allocator<_Tp>(); |
| 13 |
} |
| 14 |
static allocator<_Tp> _S_select_on_copy() { |
| 15 |
return select_on_container_copy_construction(); |
| 16 |
} |
| 17 |
}; |
| 18 |
|
| 19 |
class basic_string { |
| 20 |
struct _Alloc_hider { |
| 21 |
_Alloc_hider(allocator<char>); |
| 22 |
} _M_dataplus; |
| 23 |
|
| 24 |
public: |
| 25 |
basic_string(basic_string &) |
| 26 |
: _M_dataplus(allocator_traits<allocator<char> >::_S_select_on_copy()) {} |
| 27 |
} xxx(xxx); |