1// PR c++/67364
2// { dg-do compile { target c++11 } }
3
4template <typename Xn>
5struct tuple {
6  Xn storage_;
7
8  constexpr tuple(Xn const& xn)
9    : storage_(xn)
10  { }
11
12  template <typename ...dummy>
13  constexpr tuple(tuple const& other)
14    : storage_(other.storage_)
15  { }
16
17  template <typename ...dummy>
18  constexpr tuple(tuple& other)
19    : tuple(const_cast<tuple const&>(other))
20  { }
21};
22
23template <typename T>
24struct wrapper { T value; };
25
26template <typename T>
27constexpr wrapper<T> wrap(T t) { return {t}; }
28
29constexpr wrapper<tuple<int>> t = wrap(tuple<int>{2});
30static_assert(t.value.storage_ == 2, "");
31