
frederic.bron@alcan.com wrote:
This has come up often enough that I think this is an excellent idea: I'd be happy to help with macro usage and other details, but the most important thing is for some docs and tests to get written :-)
OK, I obtained so much from boost that I agree to try to do the job my-self with some help. As I have never done this before, could you give me a procedure/formats to follow?
OK, first off there's an email invitaion to the Sandbox on it's way, once you're signed up then checkout using: svn co https://svn.boost.org/svn/boost/sandbox [local-path] and you'll find a copy of the type_traits lib under /type_traits/. I've already added the two traits I was working on to this, feel free to add yours as well. Procedure wise, if you can follow the existing structure that would be great: use one header per trait and one one .cpp file for each trait test etc. For these traits, can we boilerplate the whole thing so that defining a trait for any binary operator is just something like: #define BOOST_TT_TRAIT_NAME is_equality_comparible #define BOOST_TT_TRAIT_OP == #include <boost/type_traits/detail/binary_op_traits.hpp> ?? Maybe the same for the tests as well if they're very repetitive? With regard to macro usage, the easiest way is to define say for example boost::detail::is_equality_comparible_imp with a member "value" that is either true or false, and then add: BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_equality_comparible,T,::boost::detail::is_equality_comparible<T>::value) To take care of the MPL etc support. Docs require quickbook and xslt support, installation instructions here: http://www.boost.org/doc/libs/1_35_0/tools/quickbook/doc/html/quickbook/inst... Try making sure that you can build the existing docs, and then ping for help if you need it with the quickbook formatting: if you copy an existing traits class and modify that it should be fairly obvious I hope! HTH, John.