Can an identity alias template be a forwarding reference?
问题 Consider the following snippet below: template <class T> using identity = T; template <class T> void foo(identity<T>&&) {} int main() { int i{}; foo(i); } i is an lvalue, hence if foo declares a forwarding reference parameter, it should compile. However, if identity<T>&& is turned to be int&& , it should raise an error instead. The code compiles in GCC 6.0.0 (demo). The code fails to compile in Clang 3.7.0 (demo) with error message: error: no known conversion from 'int' to 'identity<int> &&'