On Thu, Jun 28, 2012 at 12:39:16PM -0700, Rick Hodgin wrote:
> I've thought more about the syntax, and I see this making more sense:
> bool isSystemOpen[!isSystemClosed];
You've just declared an array of bool, whose size is the expression
!isSystemClosed.
As developers have already showed you ho
On 06/28/2012 08:39 PM, Rick Hodgin wrote:
>> Why do you want to bother with a non-standard,
>> unportable extension instead of just writing:
>>
>> inline bool isSystemClosed()
>> { return !isSystemOpen; }
>>
>> Which is simple, conventional, easy to understand
>> and portable.
>>
>> Or in C++ just
nnett
Sent: Thu, Jun 28, 2012 06:24 PM
To: Rick C. Hodgin
CC: Jonathan Wakely ; gcc
Subject: Re: Add corollary extension
>On Thu, Jun 28, 2012 at 3:08 PM, Rick C. Hodgin wrote:
>> How would you handle:
>>
>> isSystemClosed = true;
>
>A good clean error message is
On Thu, Jun 28, 2012 at 3:08 PM, Rick C. Hodgin wrote:
> How would you handle:
>
> isSystemClosed = true;
A good clean error message is ideal, and should be easy. (A proxy
object such as inv_bool can do this easily enough, but it's still
going to hurt readability.)
> You're getting into nasty
On Thu, 2012-06-28 at 18:08 -0400, Rick C. Hodgin wrote:
> How would you handle:
>
> isSystemClosed = true;
By adding one line to inv_bool
struct inv_bool {
bool& b;
operator bool() const { return !b; }
inv_bool& operator = (bool _b) { b = !_b; return *this; }
};
Cheers,
Oleg
CC: Jonathan Wakely ; gcc
Subject: Re: Add corollary extension
>On Thu, Jun 28, 2012 at 12:39 PM, Rick Hodgin wrote:
>>> Why do you want to bother with a non-standard,
>>> unportable extension instead of just writing:
>>>
>>> inline bool isSystemClosed()
&g
On Thu, Jun 28, 2012 at 12:39 PM, Rick Hodgin wrote:
>> Why do you want to bother with a non-standard,
>> unportable extension instead of just writing:
>>
>> inline bool isSystemClosed()
>> { return !isSystemOpen; }
>>
>> Which is simple, conventional, easy to understand
>> and portable.
>>
>> Or
> Why do you want to bother with a non-standard,
> unportable extension instead of just writing:
>
> inline bool isSystemClosed()
> { return !isSystemOpen; }
>
> Which is simple, conventional, easy to understand
> and portable.
>
> Or in C++ just define a suitable type, instead of
> needing chan
On 28 June 2012 17:00, Rick Hodgin wrote:
> I'd like to add an inverse definition to an existing BOOL/bool type, one
> which the compiler is natively aware of.
>
> Example:
> bool isSystemOpen;
>
> I can reference this in the manner in which it's defined:
> if (isSystemOpen)
> if (!isSystemOpen)
>
I'd like to add an inverse definition to an existing BOOL/bool type, one which
the compiler is natively aware of.
Example:
bool isSystemOpen;
I can reference this in the manner in which it's defined:
if (isSystemOpen)
if (!isSystemOpen)
However, there are times when it's more desirable to refer
10 matches
Mail list logo