15typename T::_integral
flagsFromJson(
const boost::property_tree::ptree &pt,
16 bool *keysFound =
nullptr) {
17 std::array<typename T::_integral, 2> flagsByType;
18 flagsByType.fill(
static_cast<T::_integral
>(0));
22 for (
const auto *key : T::_names()) {
23 const auto it = pt.find(key);
24 if (it == pt.not_found()) {
30 auto value = T::_from_string(key)._to_integral();
31 auto i =
static_cast<unsigned int>(it->second.template get_value<bool>());
32 flagsByType[i] |= value;
34 return (flagsByType[1] & ~flagsByType[0]);