diff --git a/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg b/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg index 634c7e87..7901e493 100644 --- a/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg +++ b/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg @@ -836,7 +836,15 @@ $if(member.typecode.primitive)$ member_destructor_ = nullptr; m_$member.name$ = $member_default_init(member)$; $else$ -member_destructor_ = [&]() {$union_member_destroy_call(member)$\}; +member_destructor_ = [&]() +{ + $if(member.typecode.isAliasType)$ + $if(member.typecode.hasScope)$ + using namespace $member.typecode.scope$; + $endif$ + $endif$ + $union_member_destroy_call(member)$ +}; new(&m_$member.name$) $member_type_declaration(member)$(); $endif$ >> diff --git a/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubMain.stg b/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubMain.stg index dd3dd356..fc81c9e2 100644 --- a/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubMain.stg +++ b/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubMain.stg @@ -20,6 +20,7 @@ main(ctx, definitions) ::= << $fileHeader(ctx=ctx, file=[ctx.filename, "main.cxx"], description=["This file acts as a main entry point to the application."])$ #include +#include #include #include #include diff --git a/thirdparty/dds-types-test b/thirdparty/dds-types-test index 923dc598..eff49726 160000 --- a/thirdparty/dds-types-test +++ b/thirdparty/dds-types-test @@ -1 +1 @@ -Subproject commit 923dc5986cc64bf34ceee2b20fdcb4c045907672 +Subproject commit eff497269eebe9dba3559f921b4e749804bf975c diff --git a/thirdparty/idl-parser b/thirdparty/idl-parser index 396ac154..513f4c21 160000 --- a/thirdparty/idl-parser +++ b/thirdparty/idl-parser @@ -1 +1 @@ -Subproject commit 396ac154bcb4c203d0945392aec9abc296eb046e +Subproject commit 513f4c21a91ee98c2a863cbbbd45ce7a260d8e6d