Optimize counting

This commit is contained in:
Victor Zverovich
2019-10-21 06:51:21 -07:00
parent 6498bc6d31
commit d39ebf3ff2
6 changed files with 23 additions and 26 deletions

View File

@@ -182,7 +182,7 @@ TEST(UtilTest, ParseNonnegativeInt) {
}
TEST(IteratorTest, CountingIterator) {
fmt::internal::counting_iterator<char> it;
fmt::internal::counting_iterator it;
auto prev = it++;
EXPECT_EQ(prev.count(), 0);
EXPECT_EQ(it.count(), 1);