blob: 0a28ae3d9a60c2231e0b118c33ebd58a77a1282d [file] [log] [blame]
Václav Kubernát3a99f002020-03-31 02:27:41 +02001#include <algorithm>
2#include "leaf_data_type.hpp"
3yang::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}