1 // { dg-options "-O2 -flto -w" }
2 template <typename> class allocator;
3 template <typename _CharT, typename = _CharT, typename = allocator<_CharT>>
4 class Trans_NS___cxx11_basic_string;
5 struct __false_type {};
6 template <typename> using __void_t = void;
7 template <typename, typename, template <typename...> class, typename...>
11 template <typename _Default, template <typename...> class _Op,
13 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> {
14 using type = _Op<_Args...>;
16 template <typename _Default, template <typename...> class _Op,
18 using __detected_or = __detector<_Default, void, _Op, _Args...>;
19 template <typename _Default, template <typename...> class _Op,
21 using __detected_or_t = typename __detected_or<_Default, _Op, _Args...>::type;
22 template <template <typename...> class _Default,
23 template <typename...> class _Op, typename... _Args>
24 using __detected_or_t_ = __detected_or_t<_Default<_Args...>, _Op, _Args...>;
25 struct random_access_iterator_tag {};
27 template <typename, typename> using __replace_first_arg_t = __undefined;
28 template <typename> class allocator {
30 template <typename> struct rebind { typedef allocator other; };
32 struct __allocator_traits_base {
33 template <typename _Alloc, typename _Up>
34 using __rebind = typename _Alloc::template rebind<_Up>::other;
35 template <typename _Tp> using __pointer = typename _Tp::pointer;
36 template <typename _Tp> using __size_type = typename _Tp::size_type;
38 template <typename _Alloc, typename _Up>
39 using __alloc_rebind =
40 __detected_or_t_<__replace_first_arg_t, __allocator_traits_base::__rebind,
42 struct allocator_traits : __allocator_traits_base {
43 using pointer = __detected_or_t<char, __pointer, allocator<char>>;
44 using size_type = __detected_or_t<int, __size_type, allocator<char>>;
45 template <typename _Tp>
46 using rebind_alloc = __alloc_rebind<allocator<char>, _Tp>;
48 struct __alloc_traits : allocator_traits {
50 typedef rebind_alloc<int> other;
53 template <typename, typename, typename> class Trans_NS___cxx11_basic_string {
55 struct _Alloc_hider : __alloc_traits::rebind::other {
56 _Alloc_hider(__alloc_traits::pointer, allocator);
58 __alloc_traits::pointer _M_local_data();
59 template <typename _InIterator>
60 void _M_construct_aux(_InIterator __beg, _InIterator __end, __false_type) {
61 _M_construct(__beg, __end, random_access_iterator_tag());
63 template <typename _InIterator>
64 void _M_construct(_InIterator __beg, _InIterator __end) {
65 _M_construct_aux(__beg, __end, __false_type());
67 template <typename _FwdIterator>
68 void _M_construct(_FwdIterator, _FwdIterator, random_access_iterator_tag);
70 void _S_copy(char *, __alloc_traits::size_type __n) {
71 __builtin_memcpy(0, &_S_copy___s2, __n);
73 template <class _Iterator>
74 void _S_copy_chars(char *__p, _Iterator __k1, _Iterator __k2) {
75 _S_copy(__p, __k2 - __k1);
77 Trans_NS___cxx11_basic_string(char *__s,
78 allocator<char> __a = allocator<char>())
79 : _M_dataplus(_M_local_data(), __a) {
80 _M_construct(__s, __s);
83 template <typename _CharT, typename _Traits, typename _Alloc>
84 template <typename _InIterator>
85 void Trans_NS___cxx11_basic_string<_CharT, _Traits, _Alloc>::_M_construct(
86 _InIterator __beg, _InIterator __end, random_access_iterator_tag) {
87 _S_copy_chars(0, __beg, __end);
90 Trans_NS___cxx11_basic_string<char> toString() const;
92 Trans_NS___cxx11_basic_string<char> Decimal::toString() const {