
"Thomas Witt" <witt at acm dot org> wrote:
The review of Douglas Gregor's Tribool library begins now and runs through Saturday, May 29.
I think the library should be accepted in Boost (problems with MSVC family of compilers need to get solved first, though). I had some comments to the library in the past. Few new isuues and nitpicks are bellow. /Pavel ____________________________________________ 1. It may be useful to have header with forward declarations tribool_fwd.hpp. ____________________________________________ 2. Just thought: shouldn't tribool name be fetched via "using" into boost namespace? I see little chance for possible clashes. ____________________________________________ 3. docs: the "Home" link on the top is broken. Actually all of them. Links to headers in reference are invalid. ____________________________________________ 4. BOOST_TRIBOOL_THIRD_STATE.html should say where (i.e. no namespace of its own) the new name get declared. An example could be here. The file name may be lowercased. ____________________________________________ 5. Question: will tribool play well with initialization library? (from Thorsten Ottosen) ____________________________________________ 6. swap() member can be added. ____________________________________________ 7. serialization support (probably non-intrusive version) should be added. Serialization of optional<> can be taken as example. ____________________________________________ 8. why is tribool() initialized to false and not indeterminate? Some explanation should be in docs. ____________________________________________ 9. Silly question: is there way to use ternary operator somehow to initialize tribool conditionally: tribool t(x ? true : indeterminate); // something like that ____________________________________________ 10 compiling test with Intel C++ 7.0 I get errors: tribool_test.cpp C:\Temp\tribool\libs\logic\test\tribool_test.cpp(18): error: more than one operator "||" matches these operands: function "boost::logic::operator||(boost::logic::tribool, bool={bool})" function "boost::logic::operator||(boost::logic::tribool, boost::logic::indeterminate_keyword_t)" operand types are: boost::logic::tribool || int assert(!x); I get similar errors for VC6. OTOH BCB 6.4 compiles and runs OK. ____________________________________________ 11. Naming nitpick: maybe function default_indeterminate_name() would have better name get_default_indeterminate_name(). ____________________________________________ EOF