Václav Kubernát | 3a99f00 | 2020-03-31 02:27:41 +0200 | [diff] [blame] | 1 | #include <algorithm> |
2 | #include "leaf_data_type.hpp" | ||||
3 | yang::Enum createEnum(const std::initializer_list<const char*>& list) | ||||
4 | { | ||||
5 | std::set<enum_> enums; | ||||
6 | std::transform(list.begin(), list.end(), std::inserter(enums, enums.end()), [](const auto& value) { | ||||
7 | return enum_{value}; | ||||
8 | }); | ||||
9 | return yang::Enum(std::move(enums)); | ||||
10 | } |