-/* Copyright (c) 2016-2022. The SimGrid Team.
+/* Copyright (c) 2016-2023. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
constexpr std::array<const char*, _XBT_COUNT_ARGS(__VA_ARGS__)> names{{_XBT_STRINGIFY_ARGS(__VA_ARGS__)}}; \
return names.at(static_cast<int>(value)); \
} \
+ static constexpr bool is_valid_##EnumType(int raw_value) \
+ { \
+ return raw_value >= 0 && raw_value < _XBT_COUNT_ARGS(__VA_ARGS__); \
+ } \
enum class EnumType { __VA_ARGS__ } /* defined here to handle trailing semicolon */
namespace simgrid {
list.erase(list.iterator_to(elem));
}
-}
-}
+} // namespace xbt
+} // namespace simgrid
#endif