Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: ****ft oper...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 7 Topic 9493 of 9807
Post > Topic >>

Re: ****ft operator undefined behavior

by Jack Klein <jackklein@[EMAIL PROTECTED] > Apr 14, 2008 at 10:43 AM

On Sun, 13 Apr 2008 00:43:12 CST, Olivier Langlois
<olanglois@[EMAIL PROTECTED]
> wrote in comp.lang.c++.moderated:

> { Please note that top-posting is discouraged in this group. -mod }
> 
> Thank you Jack for the tip.
> 
> The other workaround that I have found to work on my platform is to
> write:
> 
> unsigned char m = 32;
> register unsigned mask = (static_cast<unsigned long long>(1)<<m)-1;
> 
> There is minor clarification I can add to what you wrote. If I am not
> wrong, sizeof is a C++ reserved keyword and a builtin operator. Hence,
> there should not be any header file defining sizeof.

You are correct, I was thinking of the need to include an appropriate
header if you used std::size_t, but that type is not used in my sample
code, other than implicitly, so no such inclusion is needed.

-- 
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.para****ft.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 7 Posts in Topic:
shift operator undefined behavior
Olivier Langlois <olan  2008-04-11 15:33:41 
Re: shift operator undefined behavior
Jack Klein <jackklein@  2008-04-12 12:13:12 
Re: shift operator undefined behavior
"Bo Persson" &l  2008-04-13 00:43:14 
Re: shift operator undefined behavior
Olivier Langlois <olan  2008-04-13 00:43:12 
Re: shift operator undefined behavior
=?ISO-8859-1?Q?Daniel_Kr=  2008-04-13 00:43:11 
Re: shift operator undefined behavior
Jack Klein <jackklein@  2008-04-14 10:43:12 
Re: shift operator undefined behavior
Greg Herlihy <greghe@[  2008-04-14 13:13:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 19 19:52:23 CDT 2008.