1 // { dg-do compile { target c++14 } }
2 // PR 83406, lambda late returns are not the same as missing returns
7 const int& getter() const;
11 auto one = [](const Bar& bar) -> decltype(auto)
16 auto two = [](const Bar& bar) -> auto
21 auto three = [](const Bar& bar)
26 template <typename T, typename U> struct X
28 static const bool same = false;
31 template <typename T> struct X<T,T>
33 static const bool same = true;
38 static_assert (X<const int &, decltype (one (x))>::same, "not const int &");
39 static_assert (X<int, decltype (two (x))>::same, "not int");
40 static_assert (X<int, decltype (three (x))>::same, "not int");