Skip to content

Commit

Permalink
cpp: place the deprecated attribute at the proper position to fix cla…
Browse files Browse the repository at this point in the history
…ng compilation (OpenCyphal#299)
  • Loading branch information
beku-epitome committed Nov 3, 2023
1 parent ba5ab61 commit 6e77404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nunavut/lang/cpp/templates/_composite_type.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
// +-------------------------------------------------------------------------------------------------------------------+
{% endifuses -%}
{{ composite_type.doc | block_comment('cpp-doxygen', 0, 120) }}
{% if composite_type.deprecated -%}
struct{% if composite_type.deprecated -%}
[[deprecated("{{ composite_type }} is reaching the end of its life; there may be a newer version available")]]
{% endif -%}
struct {{composite_type|short_reference_name}} final
{{composite_type|short_reference_name}} final
{
struct _traits_ // The name is surrounded with underscores to avoid collisions with DSDL attributes.
{
Expand Down

0 comments on commit 6e77404

Please sign in to comment.