Class IsStreamInsertable

Synopsis

#include <include/internal/catch_tostring.h>

template<typename T>
class IsStreamInsertable

Description

No description yet.

Source

Lines 45-56 in include/internal/catch_tostring.h.

template<typename T>
class IsStreamInsertable {
    template<typename Stream, typename U>
    static auto test(int)
        -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());
    template<typename, typename>
    static auto test(...)->std::false_type;
public:
    static const bool value = decltype(test<std::ostream, const T&>(0))::value;
};





Add Discussion as Guest

Log in