Added casting constructors to *_wrapper
Added casting constrictors to the *_wrapper structs, so you don't need to use them in user code. This makes the API for the no-boost version compatible with the master branch, so that the example code actually works.
This commit is contained in:
parent
9b27c7db88
commit
d0b0d797b7
@ -107,18 +107,26 @@ using array = std::vector<node>;
|
||||
|
||||
struct array_wrapper {
|
||||
array values;
|
||||
|
||||
array_wrapper(const array &values) : values(values) {}
|
||||
};
|
||||
|
||||
struct map_wrapper {
|
||||
map values;
|
||||
|
||||
map_wrapper(const map &values) : values(values) {}
|
||||
};
|
||||
|
||||
struct object_wrapper {
|
||||
std::shared_ptr<object> values;
|
||||
|
||||
object_wrapper(const std::shared_ptr<object> &values) : values(values) {}
|
||||
};
|
||||
|
||||
struct lambda_wrapper {
|
||||
lambda values;
|
||||
|
||||
lambda_wrapper(const lambda &values) : values(values) {}
|
||||
};
|
||||
|
||||
std::string render(const std::string& tmplt,
|
||||
|
Loading…
Reference in New Issue
Block a user