W
Werner
Hi all,
The following code snippet does not compile under GCC > 4.6:
namespace { //anonymous
const bool error_notImplemented;
}//end namespace anonymous
Removing the const causes it to compile. I'm surprised by
this behaviour. I would have thought that zero-initialization
would kick in here. I can't make up my mind about what the
standard says about this case. Any hints?
{PS. I realize const bool error_NotImplemented( false ) would be
sufficient and more verbose, but is it required by standard?}
Kind regards,
Werner
The following code snippet does not compile under GCC > 4.6:
namespace { //anonymous
const bool error_notImplemented;
}//end namespace anonymous
Removing the const causes it to compile. I'm surprised by
this behaviour. I would have thought that zero-initialization
would kick in here. I can't make up my mind about what the
standard says about this case. Any hints?
{PS. I realize const bool error_NotImplemented( false ) would be
sufficient and more verbose, but is it required by standard?}
Kind regards,
Werner