Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation warnings for message constants #750

Commits on Jun 5, 2023

  1. Fix deprecation warnings for message constants

    Fixes ros2#743
    
    This patch fixes two issues:
    1. Code generation for `rosidl_typesupport_introspection_cpp` was overriding user-provided compile definitons, hiding the `-Wdeprecated` warnings in generated code, that users did see in `rosidl_typesupport_fastrtps_cpp`, which was not overriding those compile flags. This inconsistent result confused the issue of why we were seeing deprecation warnings in some portion of the build but not others
    1. `#ifdef`s out a variable definition for message constant members that is now deprecated in C++17. In C++14 it was still necessary to define a `static constexpr` member variable outside the class, but as of C++17 those `static constexpr` vars are now automatically inlined so the declaration and definiton are the same line, making the external definition redundant.
    
    Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
    emersonknapp committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    90f4b61 View commit details
    Browse the repository at this point in the history