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