|
Boost : |
From: John Torjo (john.lists_at_[hidden])
Date: 2005-08-22 12:36:03
Rob Stewart wrote:
> From: John Torjo <john.lists_at_[hidden]>
>
>>You're right. What comes to mind, is to have an extra parameter:
>>bool add_even_if_name_exists.
>>
>>So, if passing 'false', if "display" already exists, it's not added. If
>>passing 'true', "display" is added even if it exists.
>
>
> I suggest using an enumerated type. When called from user code,
> "true" and "false" convey no information. Enumerators can make
> the call self-documenting.
>
Yup, you're right. Will do so.
Best,
John
-- John Torjo, Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -v1.6.3 (Resource Splitter) -- http://www.torjo.com/cb/ - Click, Build, Run!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk