Akonadi
Akonadi::Server::_detail::ById< Op > Struct Template Reference
#include <entity.h>
Public Types | |
using | result_type = bool |
Detailed Description
template<template< typename U > class Op>
struct Akonadi::Server::_detail::ById< Op >
Binary predicate to sort collections of Entity subclasses by their id.
Example for sorting:
std::sort( coll.begin(), coll.end(), _detail::ById<std::less>() );
Example for finding by id:
// linear:
std::find_if( coll.begin(), coll.end(), bind( _detail::ById<std::equal_to>(), _1, myId ) );
// binary:
std::lower_bound( coll.begin(), coll.end(), myId, _detail::ById<std::less>() );
The documentation for this struct was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 03:57:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 03:57:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.