Skip to content

Commit 5515809

Browse files
committed
update
1 parent f311143 commit 5515809

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

app/generation/cpp-x/templates/common.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% block includes %}
44
#include <concepts>
55
#include <cstdint>
6+
#include <type_traits>
67
#include <limits>
78
{% endblock %}
89

@@ -85,4 +86,7 @@ constexpr void swapByteOrder(T& value) noexcept {
8586
}
8687
}
8788

89+
template <typename... Ts>
90+
struct MP_List {};
91+
8892
{% endblock %}

app/generation/cpp-x/templates/composite.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ public:
100100
{{ generate.field_ref_composite(contained_type) | indent(4) }}
101101
{% endif %}
102102
{% endfor %}
103+
104+
using Fields = MP_List<
105+
{% for contained_type in type.contained_types %}
106+
MPField<"{{ contained_type.reference_name }}", {{ contained_type.reference_name | fmt_field_ref }}>,
107+
{% endfor %}
108+
>;
103109
};
104110

105111
{% endblock %}

0 commit comments

Comments
 (0)