[ub] ub due to left operand of shift

John Regehr regehr at cs.utah.edu
Thu Oct 31 02:16:04 CET 2013


> void print_type( int arg )
>    { std::cout << "unsigned" << std::endl; }
> void print_type( unsigned int arg )
>    { std::cout << "signed" << std::endl; }

Wait a sec, each of these is printing the opposite of what it's supposed 
to print, right?

John



More information about the ub mailing list