On 06/10/2014 11:31 AM, Lorenzo Marcantonio wrote: > On Tue, Jun 10, 2014 at 10:04:36AM -0500, Dick Hollenbeck wrote: >> 1) mask: uint64_t >> 2) index (LAYER_NUM) enum, interchangeable with int in some contexts. > > An enum IIRC is always implicitly convertable to an int. > > These rules are really nasty, I'll need to try if it accept them. And > anyway I'd wanted to avoid mask literals to avoid problems of any kind.
If you back out of your operator | ( LAYER_NUM ), and only use this operator with the masks, then we might envision a migration path to YOUR objective. The objective is "get rid of the layer masks". I'm saying we can do it over time. A migration path by definition lets you transition between two acceptable alternatives over time. I do share your desire to eventually move from the masks, because only then could you transcend even 64 layers. Here are the two proposed alternatives, one is a destination, one is an origin: a) destination: use the stock std::bitset::set() methods with LAYER_NUM. b) use the operator | ( uint64_t ) and additional operators, but only with masks until a full transition to stock bitset functions can be made. > > The function vs variable advantage is not that important you did not ask me, so you cannot know. _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

