mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-26 20:30:06 +01:00
Add pointer support to basic_writer
This commit is contained in:
@@ -2553,6 +2553,14 @@ class basic_writer {
|
||||
void write(basic_string_view<char_type> str, FormatSpecs... specs) {
|
||||
write_str(str, format_specs(specs...));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
typename std::enable_if<std::is_same<T, void>::value>::type write(const T* p) {
|
||||
format_specs specs;
|
||||
specs.flags_ = HASH_FLAG;
|
||||
specs.type_ = 'x';
|
||||
write_int(reinterpret_cast<uintptr_t>(p), specs);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Range>
|
||||
|
||||
Reference in New Issue
Block a user