summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-fno-elide-ctors1.C
blob: 71c76fa0247195fb406b1a05a128fa46663116e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// PR c++/104646
// { dg-do compile { target c++11 } }
// { dg-additional-options -fno-elide-constructors }

template <typename _T1> struct pair {
  _T1 first;
  int second;
};
template <typename _Iterator> class __normal_iterator {
  _Iterator __traits_type;

public:
  constexpr __normal_iterator() {}
};
template <typename> class allocator;
template <typename> struct allocator_traits;
template <typename _Tp> struct allocator_traits<allocator<_Tp>> {
  using value_type = _Tp;
  template <typename _Up> using rebind_alloc = allocator<_Up>;
};
template <typename _Alloc> struct __alloc_traits {
  typedef allocator_traits<_Alloc> _Base_type;
  typedef typename _Base_type::value_type &const_reference;
  template <typename _Tp> struct rebind {
    typedef typename _Base_type::template rebind_alloc<_Tp> other;
  };
};
template <typename _Tp, typename _Alloc> struct _Vector_base {
  typedef typename __alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type;
};
template <typename _Tp, typename _Alloc = allocator<_Tp>> class vector {
public:
  typename __alloc_traits<
      typename _Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_reference
  operator[](long);
};
enum match_flag_type {};
template <typename, typename> class Trans_NS___cxx11_basic_regex;
class Trans_NS___cxx11_match_results;
enum _RegexExecutorPolicy { _S_auto };
template <typename, typename, typename _CharT, typename _TraitsT,
          _RegexExecutorPolicy, bool>
bool __regex_algo_impl(Trans_NS___cxx11_match_results &,
                       const Trans_NS___cxx11_basic_regex<_CharT, _TraitsT> &);
template <typename, typename, typename, bool> class _Executor;
template <typename _Ch_type, typename = _Ch_type>
class Trans_NS___cxx11_basic_regex {};
class Trans_NS___cxx11_match_results : vector<int> {
  template <typename, typename, typename _Cp, typename _Rp,
            _RegexExecutorPolicy, bool>
  friend bool __regex_algo_impl(Trans_NS___cxx11_match_results &,
                                const Trans_NS___cxx11_basic_regex<_Cp, _Rp> &);
};
template <typename _Bi_iter, typename _Alloc, typename _Ch_type,
          typename _Rx_traits>
void regex_search(_Bi_iter, _Alloc,
                  Trans_NS___cxx11_basic_regex<_Ch_type, _Rx_traits>) {
  __regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits, _S_auto, false>;
}
match_flag_type __regex_algo_impl___flags;
template <typename, typename, typename _CharT, typename _TraitsT,
          _RegexExecutorPolicy, bool>
bool __regex_algo_impl(
    Trans_NS___cxx11_match_results &__m,
    const Trans_NS___cxx11_basic_regex<_CharT, _TraitsT> &__re) {
  __normal_iterator<const char *> __e, __s;
  _Executor<int, int, _TraitsT, false> __executor(__s, __e, __m, __re,
                                                  __regex_algo_impl___flags);
  __executor._M_match();
  return false;
}
template <typename, typename, typename, bool> class _Executor {
public:
  _Executor(__normal_iterator<const char *>, __normal_iterator<const char *>,
            vector<int>, Trans_NS___cxx11_basic_regex<char>, match_flag_type);
  void _M_match() { _M_dfs(); }
  void _M_dfs();
  vector<pair<__normal_iterator<char *>>> _M_rep_count;
};
long _M_rep_once_more___i;
template <typename _BiIter, typename _Alloc, typename _TraitsT, bool __dfs_mode>
void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::_M_dfs() {
  auto __rep_count = _M_rep_count[_M_rep_once_more___i];
}
char main___trans_tmp_1;
void main___trans_tmp_2() {
  Trans_NS___cxx11_basic_regex<char> re;
  regex_search(main___trans_tmp_1, main___trans_tmp_2, re);
}