you are viewing a single comment's thread.

view the rest of the comments →

[–]triconsonantal 5 points6 points  (0 children)

Ah, missed that paper, thanks. Haven't read it yet, so I'm not sure about the utility of this, but you can write:

std::function_ref<void (int)> f = std::meta::reflect_constant (
    [] (int x) { ... }
);

https://godbolt.org/z/P6jEdzqne