Skip to main content

The ExampleList Class Reference

Declaration

class ExampleList { ... }

Included Headers

#include <src/example.h>

Base class

classstd::vector< Example >

Public Member Functions Index

boolinSort (const Example &ex)

Definition at line 36 of file example.h.

Public Member Functions

inSort()

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

Definition at line 39 of file example.h.

39 bool inSort( const Example& ex )
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 }

References begin, end and Example::name.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.