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

Declaring is_message in namespace rosidl_generator_traits. #512

Merged
merged 1 commit into from
Aug 11, 2020
Merged

Declaring is_message in namespace rosidl_generator_traits. #512

merged 1 commit into from
Aug 11, 2020

Conversation

shoeffner
Copy link
Contributor

Resolves issues with older GCC versions, as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480.

Resolves #479.

#479 seems to be a bug in gcc. The original bug report states that:

namespace Foo 
{
    template <typename T>
    struct Meow
    {
    };
}

template <>
struct Foo::Meow<int>
{
};

failed, while

The code is accepted if a declaration (without definition) of the specialization is placed in the namespace.

So changing

template<>
struct rosidl_generator_traits::is_message<Message2>: std::true_type {};

to

namespace rosidl_generator_traits
{

template<>
struct is_message<Message2>: std::true_type {};

}

resolves #479.

Resolves issues with older GCC versions, as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480

Resolves #479

Signed-off-by: Sebastian Höffner <info@sebastian-hoeffner.de>
@dirk-thomas
Copy link
Member

What platform are you targeting?

Even Ubuntu Bionic (which is not even officially supported by Rolling / Foxy) provides gcc 7.x which seems to have this issue already address.

@shoeffner
Copy link
Contributor Author

shoeffner commented Aug 11, 2020 via email

@dirk-thomas
Copy link
Member

I had the issue appearing on Debian 9 (stretch), where gcc is still version
6.4

Thanks for the context. Since the patch is trivial I think it makes sense to make it work for that platform (even if not officially targeted).

@dirk-thomas dirk-thomas added the enhancement New feature or request label Aug 11, 2020
@dirk-thomas dirk-thomas merged commit bbc154b into ros2:master Aug 11, 2020
@dirk-thomas dirk-thomas added this to Proposed in Foxy Patch Release 3 via automation Aug 11, 2020
@jacobperron jacobperron removed this from Proposed in Foxy Patch Release 3 Oct 2, 2020
@nuclearsandwich nuclearsandwich added this to Needs Backport in Dashing Patch Release 8 Nov 17, 2020
@nuclearsandwich
Copy link
Member

The affected test does not exist in Dashing so there is nothing to backport there.

@nuclearsandwich nuclearsandwich removed this from Needs Backport in Dashing Patch Release 8 Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Failed Build - Debian - rosidl_generator_traits::is_message
3 participants