[ create a new paste ] login | about

Link: http://codepad.org/7ljGJs2b    [ raw code | output | fork ]

lanzkron - C++, pasted on Dec 19:
1
2
3
4
5
6
7
8
9
#include <iostream>

int main() 
{
    unsigned short s = 1;
    std::cout << (&typeid(s+1U) == &typeid(1U)) << std::endl;
    std::cout << (&typeid(+s) == &typeid(1)) << std::endl;
    std::cout << (&typeid(s+s) == &typeid(1)) << std::endl;
}


Output:
1
2
3
true
true
true


Create a new paste based on this one


Comments: