15 lines
497 B
C++
15 lines
497 B
C++
#include <structive/property/property.hpp>
|
|
using namespace structive;
|
|
struct Device {};
|
|
int main() {
|
|
auto schema = object<Device>(
|
|
computed_property<Device, int>(depends_on_keys<"right">, [](const auto& view) {
|
|
return view.template get<"right">();
|
|
}, key<"left">),
|
|
computed_property<Device, int>(depends_on_keys<"left">, [](const auto& view) {
|
|
return view.template get<"left">();
|
|
}, key<"right">)
|
|
);
|
|
static_cast<void>(schema);
|
|
}
|