[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost
Subject:    Re: [boost] modern logic classes
From:       Robert Ramey via Boost <boost () lists ! boost ! org>
Date:       2024-05-17 22:42:40
Message-ID: a65170bf-9437-489a-b85f-fe42acc4f0e1 () rrsd ! com
[Download RAW message or body]

On 5/17/24 2:53 AM, Daniele Lupo via Boost wrote:
> On 25/04/2024 22:55, Robert Ramey via Boost wrote:
>>
>> Interesting idea.
>>
>> But rather than messing with tribool, I'd prefer to just see a new 
>> library quadbool.
>>
>> Robert Ramey
> 
> At this point I'd like to know if it's possible to thread mathematically 
> the N-bool problem and create a library for generic multidimensional 
> bool that works with templates allowing to determine N at compile time. 
> Because in the future we should have a 8-bool implementation, and so on...
> 

actually, bool, tribool, quadbool, etc....  are just special cases of 
enum {...}  Soo

using bool enum{0, 1} // false, true
using tribool enum {0, 1, 3} // false, true, indeterminant
using quadbool enum {0, 1, 3, 4} // false, true, indeterminant
...
with negation, conjunction, disjunction and whatever else is necessary.

Robert Ramey

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic