Skip to content

Разрешить try-catch блоки как тело лямбд. [] try { } catch(...) { } #634

@XRay3D

Description

@XRay3D

Разрешить try-catch блоки как тело лямбд.

constexpr auto functions = std::define_static_string(members
    | v::transform([](auto info) { return members_of(info, ctx); })
    | v::join
    | v::filter(std::meta::is_function)
// error -> | v::filter([](auto info)-> bool try{ return return_type_of(info) == ^^void; }catch(...){ return {}; })    
    | v::filter([](auto info)-> bool {try{ return return_type_of(info) == ^^void; }catch(...){ return {}; }})
    | v::transform(std::meta::display_string_of) | v::join_with("\n"sv));

Сейчас их пригодится оборачивать в {}, в то время как тело функции может состоять из try-catch блока.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions