#include<iostream>
#include<vector>
struct Empty {};
template <typename V>
void add(V&& element)
{
static_assert( std::is_rvalue_reference<V>::value, "V is not a rvalue reference");
}
int main(int argc, char *argv[])
{
add(Empty());
std::cin.ignore();
return 0;
}
我不明白为什么 static_assert 在这里失败,V
不等于V&&
这里?