Skip to content

Errors when trying to compile with -std=gnu++20 #109

Description

@russkel

I came across these when trying to compile xtypes components when using it in a project that is C++20 on gcc 11:

https://github.com/eProsima/xtypes/blob/main/include/xtypes/DynamicDataImpl.hpp#L145

xtypes/include/xtypes/DynamicDataImpl.hpp:145:49: error: overload resolution selected deleted operator '<<' [clang-diagnostic-error]
                ss << "<" << type_name << ">  " << node.data().value<char16_t>();

https://github.com/eProsima/xtypes/blob/main/include/xtypes/StringType.hpp#L112

xtypes/include/xtypes/StringType.hpp:112:70: error: use 'template' keyword to treat 'basic_string' as a dependent template name [clang-diagnostic-error]
        reinterpret_cast<std::basic_string<CHAR_T>*>(instance)->std::basic_string<CHAR_T>::~basic_string<CHAR_T>();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions