rah
Classes | Namespaces | Macros | Typedefs | Functions | Variables
test.cpp File Reference
#include "rah.hpp"
#include <iostream>
#include <vector>
#include <map>
#include <list>
#include <forward_list>
#include <ciso646>
#include <sstream>
#include <random>
#include <atomic>

Classes

struct  WhatIsIt< T >
 
struct  WhatIs< T >
 

Namespaces

 test
 

Macros

#define assert(CONDITION)
 
#define EQUAL_RANGE(RANGE, IL)
 

Typedefs

template<typename T >
using il = std::initializer_list< T >
 

Functions

template<typename A , typename B , typename C , typename D >
bool operator== (std::tuple< A, B > a, std::pair< D, C > b)
 
template<typename A , typename B , typename C , typename D >
bool operator== (std::pair< A, B > a, std::tuple< D, C > b)
 
template<typename... Args>
std::ostream & operator<< (std::ostream &os, std::tuple< Args... > tup)
 
auto test_count (int i)
 [make_pipeable create] More...
 
template<typename R , typename = std::enable_if_t<rah::is_range<R>::value>>
void toto (R &&)
 [make_pipeable create] More...
 
template<typename V >
auto toto (std::initializer_list< V > il)
 
bool is_odd (int val)
 
int main ()
 

Variables

auto PairEqual = [](auto ab) {return std::get<0>(ab) == std::get<1>(ab); }
 
auto print_elt
 
template<class T >
constexpr bool test::is_reference_v = std::is_reference<T>::value
 
template<class T >
constexpr bool test::is_rvalue_reference_v = std::is_rvalue_reference<T>::value
 

Macro Definition Documentation

◆ assert

#define assert (   CONDITION)
Value:
{ \
std::cout << __LINE__ << " assert : " << #CONDITION << std::endl; \
if (CONDITION) \
std::cout << "OK" << std::endl; \
else \
{std::cout << "NOT OK" << std::endl; abort(); } \
}

◆ EQUAL_RANGE

#define EQUAL_RANGE (   RANGE,
  IL 
)
Value:
{ \
std::cout << "assert : " << #RANGE << " == " << #IL << std::endl; \
if (rah::view::zip(RANGE, IL) | rah::all_of(PairEqual)) \
std::cout << "OK" << std::endl; \
else \
{std::cout << "NOT OK" << std::endl; abort(); } \
}
auto PairEqual
Definition: test.cpp:37
bool all_of(R &&range, P &&pred)
Checks if unary predicate pred returns true for all elements in the range.
Definition: rah - Copie.hpp:1457
auto zip(R &&... _ranges)
Given N ranges, return a new range where Mth element is the result of calling std::make_tuple on the ...
Definition: rah - Copie.hpp:1037

Typedef Documentation

◆ il

template<typename T >
using il = std::initializer_list<T>

Function Documentation

◆ is_odd()

bool is_odd ( int  val)

◆ main()

int main ( )

[make_pipeable use]

[make_pipeable use]

[single]

[single]

[ints]

[ints]

[closed_ints]

[closed_ints]

[iota]

[iota]

[join]

[join]

[join_pipeable]

[join_pipeable]

[for_each]

[for_each]

[for_each_pipeable]

[for_each_pipeable]

[generate]

[generate]

[generate_n]

[generate_n]

[cycle]

[cycle]

[cycle_pipeable]

[cycle_pipeable]

[repeat]

[repeat]

[take]

[take]

[take_pipeable]

[take_pipeable]

[drop]

[drop]

[drop_pipeable]

[drop_pipeable]

[drop_exactly]

[drop_exactly]

[drop_exactly_pipeable]

[drop_exactly_pipeable]

[sliding]

[sliding]

[sliding_pipeable]

[sliding_pipeable]

[counted]

[counted]

[unbounded]

[unbounded]

[counted_pipeable]

[counted_pipeable]

[counted_iterator]

[counted_iterator]

[rah::view::transform]

[rah::view::transform]

[rah::view::transform_pipeable]

[rah::view::transform_pipeable]

[slice]

[slice]

[slice_pipeable]

[slice_pipeable]

[stride]

[stride]

[stride_pipeable]

[stride_pipeable]

[retro]

[retro]

[retro_pipeable]

[retro_pipeable]

[zip]

[zip]

[chunk]

[chunk]

[chunk_pipeable]

[chunk_pipeable]

[filter]

[filter]

[filter_pipeable]

[filter_pipeable]

[concat]

[concat]

[enumerate]

[enumerate]

[enumerate_pipeable]

[enumerate_pipeable]

[map_value]

[map_value]

[map_value_pipeable]

[map_value_pipeable]

[map_key]

[map_key]

[map_key_pipeable]

[map_key_pipeable]

[view::set_difference]

[view::set_difference]

view::set_difference

[rah::equal_range]

[rah::equal_range]

[rah::equal_range_pipeable]

[rah::equal_range_pipeable]

[rah::equal_range_pred_0]

[rah::equal_range_pred_0]

[rah::equal_range_pred]

[rah::equal_range_pred]

[rah::equal_range_pred_pipeable]

[rah::equal_range_pred_pipeable]

[rah::binary_search]

[rah::binary_search]

[rah::binary_search_pipeable]

[rah::binary_search_pipeable]

[rah::transform3]

[rah::transform3]

[rah::transform4]

[rah::transform4]

[rah::reduce]

[rah::reduce]

[rah::reduce_pipeable]

[rah::reduce_pipeable]

[rah::any_of]

[rah::any_of] [rah::any_of_pipeable]

[rah::any_of_pipeable]

[rah::all_of]

[rah::all_of]

[rah::all_of_pipeable]

[rah::all_of_pipeable]

[rah::none_of]

[rah::none_of]

[rah::none_of_pipeable]

[rah::none_of_pipeable]

[rah::count]

[rah::count] [rah::count_pipeable]

[rah::count_pipeable]

[rah::count_if]

[rah::count_if] [rah::count_if_pipeable]

[rah::count_if_pipeable]

[rah::for_each]

[rah::for_each]

[rah::for_each_pipeable]

[rah::for_each_pipeable]

[rah::to_container_pipeable]

[rah::to_container_pipeable]

[rah::to_container]

[rah::to_container]

[rah::mismatch]

[rah::mismatch]

[rah::find]

[rah::find]

[rah::find_pipeable]

[rah::find_pipeable]

[rah::find_if]

[rah::find_if]

[rah::find_if_pipeable]

[rah::find_if_pipeable]

[rah::find_if_not]

[rah::find_if_not]

[rah::find_if_not_pipeable]

[rah::find_if_not_pipeable]

[rah::max_element]

[rah::max_element]

[rah::max_element_pipeable]

[rah::max_element_pipeable]

[rah::max_element_pred]

[rah::max_element_pred]

[rah::max_element_pred_pipeable]

[rah::max_element_pred_pipeable]

[rah::min_element]

[rah::min_element]

[rah::min_element_pipeable]

[rah::min_element_pipeable]

[rah::min_element_pred]

[rah::min_element_pred]

[rah::min_element_pred_pipeable]

[rah::min_element_pred_pipeable]

[rah::size]

[rah::size]

[rah::size_pipeable]

[rah::size_pipeable]

[rah::equal]

[rah::equal]

[rah::equal_pipeable]

[rah::equal_pipeable]

[rah::empty]

[rah::empty] [rah::empty_pipeable]

[rah::empty_pipeable]

[rah::copy]

[rah::copy]

[rah::copy_pipeable]

[rah::copy_pipeable]

[rah::copy_if]

[rah::copy_if]

[rah::copy_if_pipeable]

[rah::copy_if_pipeable]

[rah::fill]

[rah::fill]

[rah::fill_pipeable]

[rah::fill_pipeable]

[rah::back_inserter]

[rah::back_inserter]

[rah::back_insert]

[rah::back_insert]

[rah::back_insert_pipeable]

[rah::back_insert_pipeable]

[rah::stream_inserter]

[rah::stream_inserter]

[rah::remove_if]

[rah::remove_if]

[rah::remove_if_pipeable]

[rah::remove_if_pipeable]

[rah::remove]

[rah::remove]

[rah::remove_pipeable]

[rah::remove_pipeable]

[rah::partition]

[rah::partition]

[rah::partition_pipeable]

[rah::partition_pipeable]

[rah::stable_partition]

[rah::stable_partition]

[rah::stable_partition_pipeable]

[rah::stable_partition_pipeable]

[rah::erase]

[rah::erase]

[rah::erase_pipeable]

[rah::erase_pipeable]

[rah::erase_remove_if]

[rah::erase_remove_if]

[rah::sort]

[rah::sort]

[rah::sort_pipeable]

[rah::sort_pipeable]

[rah::sort_pred]

[rah::sort_pred]

[rah::sort_pred_pipeable]

[rah::sort_pred_pipeable]

[rah::stable_sort]

[rah::stable_sort]

[rah::stable_sort_pipeable]

[rah::stable_sort_pipeable]

[rah::stable_sort_pred]

[rah::stable_sort_pred]

[rah::stable_sort_pred_pipeable]

[rah::stable_sort_pred_pipeable]

[rah::shuffle]

[rah::shuffle]

[rah::shuffle_pipeable]

[rah::shuffle_pipeable]

[rah::unique]

[rah::unique]

[rah::unique_pipeable]

[rah::unique_pipeable]

[rah::unique_pred]

[rah::unique_pred]

[rah::unique_pred_pipeable]

[rah::unique_pred_pipeable]

[rah::set_difference]

[rah::set_difference]

[rah::set_intersection]

[rah::set_intersection]

[rah::action::unique]

[rah::action::unique]

[rah::action::unique_pipeable]

[rah::action::unique_pipeable]

[rah::action::unique_pred]

[rah::action::unique_pred]

[rah::action::unique_pred_pipeable]

[rah::action::unique_pred_pipeable]

[rah::action::remove_if]

[rah::action::remove_if]

[rah::action::remove_if_pipeable]

[rah::action::remove_if_pipeable]

[rah::action::remove]

[rah::action::remove]

[rah::action::remove_pipeable]

[rah::action::remove_pipeable]

[rah::action::sort]

[rah::action::sort]

[rah::action::sort_pipeable]

[rah::action::sort_pipeable]

[rah::action::sort_pred]

[rah::action::sort_pred]

[rah::action::sort_pred_pipeable]

[rah::action::sort_pred_pipeable]

[rah::action::shuffle]

[rah::action::shuffle]

[rah::action::shuffle_pipeable]

[rah::action::shuffle_pipeable]

[rah::view::sort]

[rah::view::sort]

[rah::view::sort_pipeable]

[rah::view::sort_pipeable]

[rah::view::sort_pred]

[rah::view::sort_pred]

[rah::view::sort_pred_pipeable]

[rah::view::sort_pred_pipeable]

[rah::actions::fill]

[rah::actions::fill]

◆ operator<<()

template<typename... Args>
std::ostream& operator<< ( std::ostream &  os,
std::tuple< Args... >  tup 
)

◆ operator==() [1/2]

template<typename A , typename B , typename C , typename D >
bool operator== ( std::tuple< A, B >  a,
std::pair< D, C >  b 
)

◆ operator==() [2/2]

template<typename A , typename B , typename C , typename D >
bool operator== ( std::pair< A, B >  a,
std::tuple< D, C >  b 
)

◆ test_count()

auto test_count ( int  i)

[make_pipeable create]

◆ toto() [1/2]

template<typename R , typename = std::enable_if_t<rah::is_range<R>::value>>
void toto ( R &&  )

[make_pipeable create]

◆ toto() [2/2]

template<typename V >
auto toto ( std::initializer_list< V >  il)

Variable Documentation

◆ PairEqual

auto PairEqual = [](auto ab) {return std::get<0>(ab) == std::get<1>(ab); }

◆ print_elt

auto print_elt
Initial value:
= [](auto&& elt)
{
(std::cout << std::forward<decltype(elt)>(elt)) << " ";
}