Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions | Variables
25.binary.search.cpp File Reference
#include <rw/_config.h>
#include <algorithm>
#include <cstring>
#include <rw_alg_test.h>
#include <rw_value.h>
#include <rw_driver.h>
Include dependency graph for 25.binary.search.cpp:

Go to the source code of this file.

Data Structures

struct  compare< T >
 
struct  Y
 
struct  LessThan
 

Macros

#define TEST(str, val, res, comp)
 

Functions

 _RWSTD_NAMESPACE (std)
 
bool operator< (const UserClass &lhs, const Y &rhs)
 
bool operator< (const Y &lhs, const UserClass &rhs)
 
template<class T , class ForwardIterator >
void test_binary_search (int line, const char *src_str, char val_char, bool exp_res, std::size_t ncomp, const ForwardIterator &it, const T *, bool predicate)
 
template<class T , class ForwardIterator >
void test_binary_search (const ForwardIterator &it, const T *, bool predicate)
 
template<class T >
void test_binary_search (const T *, bool predicate)
 
int main (int argc, char *argv[])
 

Variables

int rw_opt_no_predicate
 
int rw_opt_no_fwd_iter
 
int rw_opt_no_bidir_iter
 
int rw_opt_no_rnd_iter
 

Macro Definition Documentation

◆ TEST

#define TEST (   str,
  val,
  res,
  comp 
)
Value:
test_binary_search (__LINE__, str, val, res, std::size_t (comp), \
it, (T*)0, predicate)
#define T
Definition 17.names.cpp:163
#define res
Definition 17.names.cpp:531
#define comp
Definition 17.names.cpp:461
#define val
Definition 17.names.cpp:570
void test_binary_search(int line, const char *src_str, char val_char, bool exp_res, std::size_t ncomp, const ForwardIterator &it, const T *, bool predicate)
const char * str
Definition exec.cpp:170

Function Documentation

◆ _RWSTD_NAMESPACE()

_RWSTD_NAMESPACE ( std  )

Definition at line 56 of file 25.binary.search.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 317 of file 25.binary.search.cpp.

◆ operator<() [1/2]

bool operator< ( const UserClass &  lhs,
const Y &  rhs 
)
inline

Definition at line 98 of file 25.binary.search.cpp.

◆ operator<() [2/2]

bool operator< ( const Y &  lhs,
const UserClass &  rhs 
)
inline

Definition at line 104 of file 25.binary.search.cpp.

◆ test_binary_search() [1/3]

template<class T , class ForwardIterator >
void test_binary_search ( const ForwardIterator &  it,
const T *  ,
bool  predicate 
)

Definition at line 208 of file 25.binary.search.cpp.

◆ test_binary_search() [2/3]

template<class T >
void test_binary_search ( const T *  ,
bool  predicate 
)

Definition at line 263 of file 25.binary.search.cpp.

◆ test_binary_search() [3/3]

template<class T , class ForwardIterator >
void test_binary_search ( int  line,
const char *  src_str,
char  val_char,
bool  exp_res,
std::size_t  ncomp,
const ForwardIterator &  it,
const T *  ,
bool  predicate 
)

Definition at line 140 of file 25.binary.search.cpp.

Variable Documentation

◆ rw_opt_no_bidir_iter

int rw_opt_no_bidir_iter

Definition at line 257 of file 25.binary.search.cpp.

◆ rw_opt_no_fwd_iter

int rw_opt_no_fwd_iter

Definition at line 256 of file 25.binary.search.cpp.

◆ rw_opt_no_predicate

int rw_opt_no_predicate

Definition at line 255 of file 25.binary.search.cpp.

◆ rw_opt_no_rnd_iter

int rw_opt_no_rnd_iter

Definition at line 258 of file 25.binary.search.cpp.