Add support for platforms without uintptr_t

This commit is contained in:
Victor Zverovich
2019-04-06 07:53:52 -07:00
parent 0302927f56
commit bd8177177a
3 changed files with 54 additions and 12 deletions

View File

@@ -701,6 +701,13 @@ TEST(WriterTest, WriteWideString) {
// std::declval<fmt::basic_writer<fmt::wbuffer>>().write("abc");
}
TEST(WriterTest, WriteUIntPtr) {
memory_buffer buf;
fmt::writer writer(buf);
writer.write_pointer(fmt::internal::bit_cast<fmt::internal::uintptr_t>(
reinterpret_cast<void*>(0xface)), FMT_NULL);
}
TEST(FormatToTest, FormatWithoutArgs) {
std::string s;
fmt::format_to(std::back_inserter(s), "test");