1 /* Copyright (c) 2004-2023 The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef XBT_UTILS_LAZY_POWER_SET_HPP
7 #define XBT_UTILS_LAZY_POWER_SET_HPP
9 #include "src/xbt/utils/iter/iterator_wrapping.hpp"
10 #include "src/xbt/utils/iter/powerset.hpp"
12 namespace simgrid::xbt {
14 template <class Iterable, class... Args>
15 using LazyPowerset = iterator_wrapping<powerset_iterator<typename Iterable::const_iterator>, Args...>;
17 template <class Iterable> constexpr auto make_powerset_iter(const Iterable& container)
19 return make_iterator_wrapping<powerset_iterator<typename Iterable::const_iterator>>(container.begin(),
23 } // namespace simgrid::xbt