← Back to team overview

kicad-developers team mailing list archive

Re: Damned the 'undefined global constructor order'

 

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.

The function vs variable advantage is not that important... in fact if
you use accessors at the end you always use functions to access values
anyway.

BTW I once even seen a warning like 'You'd think that it's ok, but the
C++ standard says it's not, so behaviour will be different than you
think'. Like the precedence of << and >>, only more difficult to
remember

C++99 is already way too complex, C++11 is.. well...unbelievely so.
C++14 also will change some rules of C++11 in a not-exactly compatible
way (since they discovered that the current constexpr is not useful in
practice). And move constructor with member defaulting/deleting is
ridiculous...

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References