You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

23 lines
301 B

#include "type_name.h"
#include <iostream>
void f(const int&) {
}
#define T(v) std::cout << #v << ": " << TYPE_NAME(v) << "\n"
int main() {
auto&& i = 1;
auto& ri = i;
auto const& x = std::move(ri);
decltype(ri) y = ri;
f(i);
// f(std::forward(i));
T(i);
T(ri);
T(x);
T(y);
return 0;
}