Simply including for instance
on vc80 and vc100 yields :
Could it be a problem of line ending (windows/linux)? Could you try with that version: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=type_traits-dos.tar.bz2&directory=Extension&
Anyway, it seems that nothing in the documentation indicates the new traits are limited to numeric types.
It should not be limited to numeric types.
Moreover it sort of works for testing if a type is serializable to an std::ostream : BOOST_STATIC_ASSERT(( boost::has_operator_left_shift< std::ostream, int
::value )); And it also works for far more advanced cases (like a type convertible to another type which is serializable, or a class deriving from another class which is serializable, etc..)
OK, thank you for testing this.
However it doesn't work with a pointer type, for instance this fails : BOOST_STATIC_ASSERT(( boost::has_operator_left_shift< std::ostream, void*
::value ));
Can you say what you mean by it doesn't work? Do you mean compile error or returns the wrong value?
Will this use case be supported ?
This should work properly. I will have a look. Thanks for testing. Frédéric