27 typedef std::set<User*, IdLess<User>>
UserSet;
196 std::vector<const T*>
ApplyPredicate(std::function<
bool(
const T*)> predicate)
const;
205 template<
class T,
class R>
206 std::vector<R>
ApplySelector(std::function<R(
const T*)> selector, std::function<
bool(
const T*)> predicate)
const;
214 template<
class T,
class R>
215 std::vector<R>
ApplySelector(std::function<R(
const T*)> selector)
const;
255 template<
class T,
class R>
258 return ApplySelector<T, R>(selector, [](
const T*) {
return true; });
261 template<
class T,
class R>
265 std::vector<const T*> ts = ApplyPredicate<T>(predicate);
268 std::vector<R> result;
269 result.reserve(ts.size());
271 std::transform(ts.begin(), ts.end(), std::back_inserter(result), selector);
276 #endif // GRIDMANAGER_H_