Doxygen
Loading...
Searching...
No Matches
ExampleList Class Reference

#include <src/example.h>

+ Inheritance diagram for ExampleList:
+ Collaboration diagram for ExampleList:

Public Member Functions

bool inSort (const Example &ex)
 

Detailed Description

Definition at line 36 of file example.h.

Member Function Documentation

◆ inSort()

bool ExampleList::inSort ( const Example & ex)
inline

Definition at line 39 of file example.h.

40 {
41 auto it = std::find_if(begin(),end(),[&ex](const Example &e) { return e.name==ex.name; });
42 if (it==end())
43 {
44 insert( std::upper_bound( begin(), end(), ex,
45 [](const auto &e1,const auto &e2) { return e1.name < e2.name; }
46 ), ex
47 );
48 return true;
49 }
50 return false;
51 }
DirIterator begin(DirIterator it) noexcept
Definition dir.cpp:170
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
QCString name
Definition example.h:32

References begin(), end(), and Example::name.


The documentation for this class was generated from the following file: