#pragma once #include #include "ValueBroker.h" namespace crepe { template ValueBroker::ValueBroker(T & value) : setter([&value] (const T & target) { value = std::move(target); }), getter([&value] () -> const int & { return value; }) { } template ValueBroker::ValueBroker(const setter_t & setter, const getter_t & getter) : setter(setter), getter(getter) { } template const T & ValueBroker::get() { return this->getter(); } template void ValueBroker::set(const T & value) { this->setter(value); } }