1 // { dg-do compile { target c++11 } }
2 // { dg-options "-Wredundant-move" }
7 struct remove_reference
10 template<typename _Tp>
11 struct remove_reference<_Tp&>
12 { typedef _Tp type; };
14 template<typename _Tp>
15 struct remove_reference<_Tp&&>
16 { typedef _Tp type; };
18 template<typename _Tp>
19 constexpr typename std::remove_reference<_Tp>::type&&
20 move(_Tp&& __t) noexcept
21 { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
26 S1(S1 const &) = delete;
28 S1 operator =(S1 const &) = delete;
32 struct S2 { S2(S1); };
35 return { std::move(s) }; // { dg-bogus "redundant move" }