Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have you used boost::tribool in real work?

Tags:

c++

boost

tribool strikes me as one of the oddest corners of Boost. I see how it has some conveniences compared to using an enum but an enum can also be easily expanded represent more than 3 states.

In what real world ways have you put tribool to use?

like image 524
Duck Avatar asked Aug 13 '09 03:08

Duck


1 Answers

While I havn't used C++, and hence boost, I have used three-state variables quite extensively in a network application where I need to store state as true/false/pending.

like image 103
Matthew Scharley Avatar answered Oct 02 '22 09:10

Matthew Scharley