
10 Jul
2008
10 Jul
'08
9:44 a.m.
On Thu, Jul 10, 2008 at 6:22 AM, Maciej Sobczak <prog@msobczak.com> wrote:
Thorsten Ottosen wrote:
[snip]
BTW - what about optional<bool>?
optional<bool> optional_switch = ...
if (optional_switch) { // the switch can be "false" here! }
But you use a dereference operator to access the value. Do you find confusing to use a pointer to a bool too? It seems natural to use the unspecified-bool-type idiom to me. But this is only personal taste IMHO.
Isn't it confusing?
I don't find it so. I didn't even knew there were a is_initialized function. Though I don't find using it any more confusing. So either way should be good IMO. [snip]
-- Maciej Sobczak * www.msobczak.com * www.inspirel.com
Regards, -- Felipe Magno de Almeida