2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / rv-cast5.C
blob5233078f7b4a7a34fd8bb8577f8d6ba8b676b15f
1 // { dg-do compile { target c++11 } }
3 template <typename T>
4 struct hold {
5   T value;
6   constexpr T&& operator()() && { return static_cast<T&&>(value); }
7 };
9 int main()
11   hold<bool&&>{static_cast<bool>(42)}();