diff --git a/test/integration/std_optional.toml b/test/integration/std_optional.toml index 9da0271..b943df3 100644 --- a/test/integration/std_optional.toml +++ b/test/integration/std_optional.toml @@ -18,6 +18,7 @@ includes = ["optional", "cstdint", "vector"] expect_json_v2 = ''' [ { + "typeNames": ["std::optional"], "staticSize": 16, "exclusiveSize": 16, "size": 16, @@ -45,6 +46,7 @@ includes = ["optional", "cstdint", "vector"] expect_json_v2 = ''' [ { + "typeNames": ["std::optional"], "staticSize": 16, "exclusiveSize": 8, "size": 16, @@ -52,6 +54,7 @@ includes = ["optional", "cstdint", "vector"] "capacity": 1, "members": [ { + "typeNames": ["uint64_t"], "staticSize": 8, "exclusiveSize": 8 } @@ -77,6 +80,7 @@ includes = ["optional", "cstdint", "vector"] expect_json_v2 = ''' [ { + "typeNames": ["std::optional>>"], "staticSize": 32, "exclusiveSize": 32, "size": 32, @@ -112,6 +116,7 @@ includes = ["optional", "cstdint", "vector"] expect_json_v2 = ''' [ { + "typeNames": ["std::optional>>"], "staticSize": 32, "exclusiveSize": 8, "size": 72, @@ -119,6 +124,7 @@ includes = ["optional", "cstdint", "vector"] "capacity": 1, "members": [ { + "typeNames": ["std::vector>"], "staticSize": 24, "exclusiveSize": 24, "size": 64, diff --git a/types/optional_type.toml b/types/optional_type.toml index eeba64e..2fc6c60 100644 --- a/types/optional_type.toml +++ b/types/optional_type.toml @@ -41,14 +41,7 @@ if (container.has_value()) { [[codegen.processor]] type = "types::st::Sum, typename TypeHandler::type>" func = """ -static constexpr std::array names{"TODO"}; -static constexpr auto elementField = inst::Field{ - sizeof(T0), - "el", - names, - TypeHandler::fields, - TypeHandler::processors, -}; +static constexpr auto elementField = make_field("el"); auto sum = std::get(d.val);