I noticed boost log has a helper function for operator<<

template< typename CharT, typename TraitsT, typename AllocatorT, typename T >
inline basic_formatting_ostream< CharT, TraitsT, AllocatorT >&
operator<< (basic_formatting_ostream< CharT, TraitsT, AllocatorT >& strm, T const& value)
{
    strm.stream() << value;
    return strm;
}

which is useful because a lot of code has operator<< overloads specifically for std::ostream.

Recently we've moved our code to use a generic

template <class stream, int N>
inline stream& operator<<(stream& os, const BlahClass& value)

which conflicts with the boost log helper function, but is useful for our own ostream-like classes.

What's the best practice here?  Can we make the two mesh by using traits of some sort?  Should we do all of our type to string conversions ahead of time using something like folly::to?

Cheers,
Yi