Re: [ovs-dev] [classifier-opt 06/28] util: New macro CONST_CAST.

2012-07-27 Thread Ben Pfaff
On Fri, Jul 27, 2012 at 01:38:15PM -0700, Ethan Jackson wrote: > > Thanks. I think it's a win on the whole too but I'm never sure > > whether the syntax is too ugly, even though I've done it this way > > before elsewhere. > > I can't think of a better way to do it without compiler support. Even

Re: [ovs-dev] [classifier-opt 06/28] util: New macro CONST_CAST.

2012-07-27 Thread Ethan Jackson
> Thanks. I think it's a win on the whole too but I'm never sure > whether the syntax is too ugly, even though I've done it this way > before elsewhere. I can't think of a better way to do it without compiler support. Even the const cast in c++ is a bit ugly. Frankly, I think casting should be

Re: [ovs-dev] [classifier-opt 06/28] util: New macro CONST_CAST.

2012-07-27 Thread Ben Pfaff
Thanks. I think it's a win on the whole too but I'm never sure whether the syntax is too ugly, even though I've done it this way before elsewhere. On Fri, Jul 27, 2012 at 01:33:59PM -0700, Ethan Jackson wrote: > Awesome, this is a huge win. Thanks a lot. > > Ethan > > On Fri, Jul 20, 2012 at 4

Re: [ovs-dev] [classifier-opt 06/28] util: New macro CONST_CAST.

2012-07-27 Thread Ethan Jackson
Awesome, this is a huge win. Thanks a lot. Ethan On Fri, Jul 20, 2012 at 4:25 PM, Ben Pfaff wrote: > Casts are sometimes necessary. One common reason that they are necessary > is for discarding a "const" qualifier. However, this can impede > maintenance: if the type of the expression being ca