Skip to content

Commit

Permalink
cpp: relocate the deprecated attribute to fix clang compilation (#299) (
Browse files Browse the repository at this point in the history
#322)

Please review the syntax, I'm no Jinja expert. See #299 for explanation.
  • Loading branch information
beku-epitome authored Nov 3, 2023
1 parent ba5ab61 commit d9e0560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nunavut/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
6 changes: 3 additions & 3 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
{%- endif -%}
{{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 d9e0560

Please sign in to comment.