Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (15 sloc) 545 Bytes
#include <iostream>
int main()
{
int i = 1;
double d = 1.0;
std::cout << std::is_same<int, decltype(i + i)>::value << "\n"
<< std::is_same<double, decltype(d + i)>::value << "\n"
<< std::is_same<int, decltype(d + i)>::value << "\n"
<< std::endl;
std::cout << std::is_same<int, decltype(i)>::value << "\n"
<< std::is_same<int, decltype((i))>::value << "\n"
<< std::is_same<int&, decltype((i))>::value << "\n"
<< std::endl;
return 0;
}