架构优化
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user