Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Waddress-3.C
bloba97c7814ce58fcf6f901e4f90190c2179ef75407
1 // PR c++/65168
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Waddress -Wno-return-type" }
4 // We shouldn't warn in unevaluated context about the address of a reference
5 // always being true.
7 template <class T, class U>
8 auto f(U&& u) -> decltype(T(u)) { }
10 int main()
12   bool ar[4];
13   f<bool>(ar);