Commit c1d137ed authored by Victor Zverovich's avatar Victor Zverovich

Add support for nonconiguous iterators

parent f6fd38bb
This diff is collapsed.
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <climits> #include <climits>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <list>
#include <memory> #include <memory>
#include <stdint.h> #include <stdint.h>
...@@ -1908,3 +1909,9 @@ TEST(FormatTest, FormatStringErrors) { ...@@ -1908,3 +1909,9 @@ TEST(FormatTest, FormatStringErrors) {
TEST(FormatTest, ToString) { TEST(FormatTest, ToString) {
EXPECT_EQ("42", fmt::to_string(42)); EXPECT_EQ("42", fmt::to_string(42));
} }
TEST(WriterTest, NoncontiguousIterator) {
std::list<char> out;
fmt::format_to(std::back_inserter(out), "{}", 42);
EXPECT_EQ("42", std::string(out.begin(), out.end()));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment