2 // { dg-additional-options "-std=c++11" }
6 typedef long unsigned size_t;
7 template <typename> class complex;
8 template <typename _Tp> complex<_Tp> operator+(complex<_Tp>, complex<_Tp>)
14 template <> struct complex<double>
16 complex (int __i) : _M_value{ __i } {}
18 void operator+=(complex __z) { _M_value = __z.imag (); }
19 _Complex double _M_value;
26 std::complex<double> &operator[](int i) { return data_[i]; }
27 std::complex<double> *data_;
31 static std::complex<double>
32 apply (std::complex<double> t1, std::complex<double> t2)
37 template <class T1, class> struct C
40 apply (T1 t1, std::complex<double> t2)
45 template <class E> class D
53 typedef std::complex<double> value_type;
54 value_type operator()(int) { return B::apply (0, 0); }
56 template <class E1, class E2> G operator+(D<E1>, D<E2>);
57 template <template <class, class> class F, class V, class E>
59 indexing_vector_assign (V v, D<E> e)
62 F<typename V::reference, typename E::value_type>::apply (v (i), e ()(0));
64 template <template <class, class> class F, class V, class E>
66 vector_assign (V v, D<E> e, int)
68 indexing_vector_assign<F> (v, e);
70 template <template <class, class> class F, class V, class E>
72 vector_assign (V v, D<E> e)
74 vector_assign<F> (v, e, typename V::storage_category ());
76 class H : public D<int>
79 typedef std::complex<double> &reference;
80 typedef int storage_category;
82 template <class AE> H (D<AE> ae) : data_ (0)
84 vector_assign<C> (*this, ae);
91 reference operator()(int i) { return data ()[i]; }
94 template <class T1, class V1, class T2, class V2>
96 rot (T1, V1 v1, T2, V2 v2)
100 template <class, unsigned long> struct F
104 template struct F<H, 3>;
105 template <class V, std::size_t N>