[mythtv] C++ style

Simon Kenyon simon at koala.ie
Wed Feb 11 20:34:07 EST 2004


On Wednesday 11 February 2004 20:03, Daniel Thor Kristjansson wrote:
> Classes are the real reason to prefer pre-increment over post-increment,
> with integers the compiler will figure it out. There is also a backward
> compatibility reason for it. In old school C ++i is defined as a
> pre-increment and i++ is defined as "whatever is fastest" so there is
> no actual post-increment in C. Many compilers including gcc support it
> as a post-increment because that's less surprising, but you might not
> want to depend on that.
in any-school C i++ is post-increment
has been for 20 years or more
these operators derive from the pre and post increment and decrement 
instructions in the pdp-11
--
simon


More information about the mythtv-dev mailing list