```
#include
#include
using namespace std::experimental;
//====================================================================
// Library code: implementing the metaclass (once)
consteval void value(meta::info source) {
for (meta::info mem : meta::member_range(source)) {
if (meta::is_member_function(mem)) {
meta::compiler.require(!meta::is_virtual(mem),
"a value type may not have virtual functions");
}
-> mem;
}
}
class(value) Point {
virtual int foo() {
return 0;
}
int x;
};
// Compiler Explorer note: Click the "triangle ! icon" to see the output:
consteval {
meta::compiler.print(reflexpr(Point));
}
```
A reproducible example can be found here: https://cppx.godbolt.org/z/zYzWq8