From d7c8637021079174aa45d695053ce80469476fc8 Mon Sep 17 00:00:00 2001 From: Benedek Kupper Date: Fri, 3 Nov 2023 09:57:42 +0100 Subject: [PATCH] cpp: place the deprecated attribute at the proper position to fix clang compilation (#299) --- src/nunavut/_version.py | 2 +- src/nunavut/lang/cpp/templates/_composite_type.j2 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nunavut/_version.py b/src/nunavut/_version.py index 2f1fcc07..f9225a84 100644 --- a/src/nunavut/_version.py +++ b/src/nunavut/_version.py @@ -8,7 +8,7 @@ .. autodata:: __version__ """ -__version__ = "2.3.0" +__version__ = "2.3.1" __license__ = "MIT" __author__ = "OpenCyphal" __copyright__ = "Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. Copyright (c) 2023 OpenCyphal." diff --git a/src/nunavut/lang/cpp/templates/_composite_type.j2 b/src/nunavut/lang/cpp/templates/_composite_type.j2 index 78900b00..cd286b87 100644 --- a/src/nunavut/lang/cpp/templates/_composite_type.j2 +++ b/src/nunavut/lang/cpp/templates/_composite_type.j2 @@ -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 +{%- endif -%} +{{composite_type|short_reference_name}} final { struct _traits_ // The name is surrounded with underscores to avoid collisions with DSDL attributes. {