Skip to content

Reflecting and unreflecting a data member causes compiler crash #307

@matus-chochlik

Description

@matus-chochlik

#include <experimental/compiler>
#include <experimental/meta>

struct S {
int i{0};
}

consteval auto reflect_S_i() {
using namespace std::experimental::meta;
return *members_of(^S, is_data_member).begin();
};

auto main() -> int {
S s{};
const auto mp = &([: reflect_S_i() :]);
(s.*mp) = 1;
return 0;
}

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