Skip to content

Extra ';' inside a struct (-Wextra-semi warning in Clang) in the BOOST_OPENMETHOD_OVERRIDE macro #48

@SidneyCogdill

Description

@SidneyCogdill

BOOST_OPENMETHOD_DETAIL_LOCATE_METHOD(NAME, ARGS); \

struct IFoo {
    virtual ~IFoo() = default;
};

BOOST_OPENMETHOD(foo, (virtual_<IFoo&> a), void)

struct Foo : IFoo { };
BOOST_OPENMETHOD_OVERRIDE(foo, (Foo & a), void)
{
}

This got expanded into:

template <typename...>
struct foo_boost_openmethod_overriders;
template <>
struct foo_boost_openmethod_overriders<void(Foo& a)> {
    template <typename T>
    struct boost_openmethod_detail_locate_method_aux;
    template <typename... A>
    struct boost_openmethod_detail_locate_method_aux<void(A...)> {
        using type = decltype(foo_boost_openmethod_guide(std ::declval<A>()...));
    };
    ; // <- Extra `;` here
    static auto fn(Foo& a) -> void;
    static auto has_next() -> bool;
    template <typename... Args>
    static auto next(Args&&... args) -> decltype(auto);
};
inline auto foo_boost_openmethod_overriders<void(Foo& a)>::has_next() -> bool { return boost_openmethod_detail_locate_method_aux<void(Foo & a)>::type ::has_next<fn>(); }
template <typename... Args>
inline auto foo_boost_openmethod_overriders<void(Foo& a)>::next(Args&&... args) -> decltype(auto) { return boost_openmethod_detail_locate_method_aux<void(Foo & a)>::type ::next<fn>(std ::forward<Args>(args)...); }
static foo_boost_openmethod_overriders<void(Foo& a)>::boost_openmethod_detail_locate_method_aux<void(Foo& a)>::type ::override<foo_boost_openmethod_overriders<void(Foo& a)>::fn> openmethod_gensym_0;
auto foo_boost_openmethod_overriders<void(Foo& a)>::fn(Foo& a) -> boost ::mp11 ::mp_back<boost ::mp11 ::mp_list<void>>
{
}

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