C++ Logo

sg12

Advanced search

Re: [ub] ub due to left operand of shift

From: John Regehr <regehr_at_[hidden]>
Date: Wed, 30 Oct 2013 19:16:04 -0600
> 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

Received on 2013-10-31 02:16:15