Struct StringMaker

Synopsis

#include <include/internal/catch_tostring.h>

template <typename T, typename = void>
struct StringMaker

Description

No description yet.

Mentioned in

Methods

convert overload

Source

Lines 98-121 in include/internal/catch_tostring.h.

template <typename T, typename = void>
struct StringMaker {
    template <typename Fake = T>
    static
    typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
        convert(const Fake& value) {
            ReusableStringStream rss;
            // NB: call using the function-like syntax to avoid ambiguity with
            // user-defined templated operator<< under clang.
            rss.operator<<(value);
            return rss.str();
    }
    template <typename Fake = T>
    static
    typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
        convert( const Fake& value ) {
!defined(CATCH_CONFIG_FALLBACK_STRINGIFIER)
        return Detail::convertUnstreamable(value);
e
        return CATCH_CONFIG_FALLBACK_STRINGIFIER(value);
if
    }
};





Add Discussion as Guest

Log in