58
![Stack Overflow](http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png)
This question is old, but with C++11 we got a new way to check for a functions existence (or existence of any non-type member, really), relying on SFINAE again:
template<class T>
auto serialize_imp(std::ostream& os, T const& obj, int)
-> decltype(os << obj, void())
{
os << obj;
}
template<...