mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-26 04:09:59 +01:00
Specialize formatter for all std::basic_string types (#3943)
* Specialize `formatter` for all `std::basic_string` types * mock-allocator: add member types to make GCC 4.8 happy
This commit is contained in:
@@ -4017,11 +4017,14 @@ FMT_FORMAT_AS(unsigned short, unsigned);
|
||||
FMT_FORMAT_AS(long, detail::long_type);
|
||||
FMT_FORMAT_AS(unsigned long, detail::ulong_type);
|
||||
FMT_FORMAT_AS(Char*, const Char*);
|
||||
FMT_FORMAT_AS(std::basic_string<Char>, basic_string_view<Char>);
|
||||
FMT_FORMAT_AS(std::nullptr_t, const void*);
|
||||
FMT_FORMAT_AS(detail::std_string_view<Char>, basic_string_view<Char>);
|
||||
FMT_FORMAT_AS(void*, const void*);
|
||||
|
||||
template <typename Char, typename Traits, typename Allocator>
|
||||
class formatter<std::basic_string<Char, Traits, Allocator>, Char>
|
||||
: public formatter<basic_string_view<Char>, Char> {};
|
||||
|
||||
template <typename Char, size_t N>
|
||||
struct formatter<Char[N], Char> : formatter<basic_string_view<Char>, Char> {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user