-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
60 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,18 @@ | ||
fmt library 11.0.2 requires the implementation of the append function aside | ||
from push_back method when formatting the bustache specific container | ||
|
||
diff --git a/include/bustache/model.hpp b/include/bustache/model.hpp | ||
index 575969a..6df2cff 100644 | ||
index 575969a..07bc89d 100644 | ||
--- a/include/bustache/model.hpp | ||
+++ b/include/bustache/model.hpp | ||
@@ -8,7 +8,7 @@ | ||
#define BUSTACHE_MODEL_HPP_INCLUDED | ||
|
||
#include <bustache/format.hpp> | ||
-#include <version> | ||
+#include <version> | ||
#include <vector> | ||
#include <cstring> | ||
#include <concepts> | ||
@@ -330,6 +330,16 @@ namespace bustache::detail | ||
@@ -330,6 +330,13 @@ namespace bustache::detail | ||
buf[count++] = c; | ||
} | ||
|
||
+ template <typename U> | ||
+ void append(const U* begin, const U* end) | ||
+ void append(const char* const begin, const char* const end) | ||
+ { | ||
+ size_t content_count = end - begin; | ||
+ for (size_t i = 0; i < content_count; ++i) { | ||
+ push_back(begin[i]); | ||
+ for (const char* it = begin; it != end; ++it) { | ||
+ push_back(*it); | ||
+ } | ||
+ begin += content_count; | ||
+ } | ||
+ | ||
void flush() { os(buf, count); } | ||
|
||
std::size_t count = 0; | ||
@@ -592,7 +602,7 @@ namespace bustache | ||
{ | ||
static constexpr model kind = model::atom; | ||
}; | ||
- | ||
+ | ||
template<String T> | ||
struct impl_test<T> | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters