Make formatter<T> override ostream<< for templates (#952)

This commit is contained in:
Victor Zverovich
2019-01-21 07:11:49 -08:00
parent 1b11b000c7
commit 5f1ceebc7f
5 changed files with 87 additions and 36 deletions

View File

@@ -2144,6 +2144,10 @@ struct test_context {
typedef char char_type;
typedef fmt::basic_format_arg<test_context> format_arg;
template <typename T> struct formatter_type {
typedef fmt::formatter<T, char_type> type;
};
FMT_CONSTEXPR fmt::basic_format_arg<test_context> next_arg() {
return fmt::internal::make_arg<test_context>(11);
}