DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (cdf352f02ac4)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

namespace std {
template <typename> struct remove_reference;

template <typename _Tp> struct remove_reference { typedef _Tp type; };

template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; };

template <typename _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; };

template <typename _Tp>
constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t);

} // namespace std

// Standard case.
template <typename T, typename U> void f1(U &&SomeU) {
  T SomeT(std::move(SomeU));
  // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: forwarding reference passed to
  // CHECK-FIXES: T SomeT(std::forward<U>(SomeU));
}

void foo() {
  f1<int, int>(2);
}