Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions
20.operators.cpp File Reference
#include <rw/_config.h>
#include <algorithm>
#include <deque>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <set>
#include <string>
#include <vector>
#include <utility>
#include <cstddef>
#include <rw_driver.h>
Include dependency graph for 20.operators.cpp:

Go to the source code of this file.

Data Structures

struct  UnaryPredicate< T >
 
struct  BinaryPredicate< T >
 
struct  RandomNumberGenerator< T >
 
struct  Generator< T >
 
struct  UnaryFunction< T >
 
struct  BinaryFunction< T >
 

Macros

#define FUN(ignore, result, name, arg_list)
 
#define TEST_INEQUALITY(T)
 
#define TEST_OPERATORS(T)
 
#define TEST_INPUT_ITERATORS(T)
 
#define TEST_OUTPUT_ITERATORS(T)
 
#define TEST_FORWARD_ITERATORS(T)
 
#define TEST_BIDIRECTIONAL_ITERATORS(T)
 
#define TEST_RANDOM_ACCESS_ITERATORS(T)
 

Functions

 _USING (namespace std)
 
 _USING (namespace std::rel_ops)
 
template<class Container , class RandomAccessIterator >
void test_iterator (Container, RandomAccessIterator)
 
template<class Container >
void test_iterator (Container, int *)
 
template<class T , class InputIterator >
void test_input_iterators (T, InputIterator)
 
template<class T , class OutputIterator >
void test_output_iterators (T, OutputIterator)
 
template<class T , class ForwardIterator >
void test_forward_iterators (T, ForwardIterator)
 
template<class T , class BidirectionalIterator >
void test_bidirectional_iterators (T, BidirectionalIterator)
 
template<class T , class RandomAccessIterator >
void test_random_access_iterators (T, RandomAccessIterator)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ FUN

#define FUN (   ignore,
  result,
  name,
  arg_list 
)
Value:
do { \
result (*pf) arg_list = &name; \
_RWSTD_UNUSED (pf); \
} while (0)
#define pf
Definition 17.names.cpp:516
const char * name
Definition codecvt1.cpp:72

Definition at line 95 of file 20.operators.cpp.

◆ TEST_BIDIRECTIONAL_ITERATORS

#define TEST_BIDIRECTIONAL_ITERATORS (   T)
Value:
test_bidirectional_iterators (T (), std::deque<T>::iterator ()); \
test_bidirectional_iterators (T (), std::list<T>::iterator ()); \
test_bidirectional_iterators (T (), std::basic_string<T>::iterator ()); \
test_bidirectional_iterators (T (), std::vector<T>::iterator ())
#define T
Definition 17.names.cpp:163
void test_bidirectional_iterators(T, BidirectionalIterator)

◆ TEST_FORWARD_ITERATORS

#define TEST_FORWARD_ITERATORS (   T)
Value:
test_forward_iterators (T (), std::deque<T>::iterator ()); \
test_forward_iterators (T (), std::list<T>::iterator ()); \
test_forward_iterators (T (), std::basic_string<T>::iterator ()); \
test_forward_iterators (T (), std::vector<T>::iterator ())
void test_forward_iterators(T, ForwardIterator)

◆ TEST_INEQUALITY

#define TEST_INEQUALITY (   T)
Value:
FUN (T, bool, std::rel_ops::operator!=, \
(const T::iterator&, const T::iterator&)); \
FUN (T, bool, std::rel_ops::operator!=, \
(const T::const_iterator&, const T::const_iterator&))
#define FUN(ignore, result, name, arg_list)

Definition at line 113 of file 20.operators.cpp.

◆ TEST_INPUT_ITERATORS

#define TEST_INPUT_ITERATORS (   T)
Value:
test_input_iterators (T (), std::deque<T>::iterator ()); \
test_input_iterators (T (), std::list<T>::iterator ()); \
test_input_iterators (std::map<T, T>::value_type (), \
std::map<T, T>::iterator ()); \
test_input_iterators (std::multimap<T, T>::value_type (), \
std::multimap<T, T>::iterator ()); \
test_input_iterators (T (), std::set<T>::iterator ()); \
test_input_iterators (T (), std::multiset<T, T>::iterator ()); \
test_input_iterators (T (), std::basic_string<T>::iterator ()); \
test_input_iterators (T (), std::vector<T>::iterator ())
void test_input_iterators(T, InputIterator)

◆ TEST_OPERATORS

#define TEST_OPERATORS (   T)
Value:
FUN (T, bool, std::rel_ops::operator>, \
(const T::iterator&, const T::iterator&)); \
FUN (T, bool, std::rel_ops::operator<=, \
(const T::iterator&, const T::iterator&)); \
FUN (T, bool, std::rel_ops::operator>=, \
(const T::iterator&, const T::iterator&)); \
FUN (T, bool, std::rel_ops::operator>, \
(const T::const_iterator&, const T::const_iterator&)); \
FUN (T, bool, std::rel_ops::operator<=, \
(const T::const_iterator&, const T::const_iterator&)); \
FUN (T, bool, std::rel_ops::operator>=, \
(const T::const_iterator&, const T::const_iterator&))
#define TEST_INEQUALITY(T)

Definition at line 119 of file 20.operators.cpp.

◆ TEST_OUTPUT_ITERATORS

#define TEST_OUTPUT_ITERATORS (   T)
Value:
test_output_iterators (T (), std::deque<T>::iterator ()); \
test_output_iterators (T (), std::list<T>::iterator ()); \
test_output_iterators (T (), std::basic_string<T>::iterator ()); \
test_output_iterators (T (), std::vector<T>::iterator ())
void test_output_iterators(T, OutputIterator)

◆ TEST_RANDOM_ACCESS_ITERATORS

#define TEST_RANDOM_ACCESS_ITERATORS (   T)
Value:
test_random_access_iterators (T (), std::deque<T>::iterator ()); \
test_random_access_iterators (T (), std::basic_string<T>::iterator ()); \
test_random_access_iterators (T (), std::vector<T>::iterator ()); \
void test_random_access_iterators(T, RandomAccessIterator)

Function Documentation

◆ _USING() [1/2]

_USING ( namespace  std)

20.operators.cpp - test exercising [lib.operators]

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 1994-2006 Rogue Wave Software.

◆ _USING() [2/2]

_USING ( namespace std::rel_ops  )

◆ main()

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

Definition at line 522 of file 20.operators.cpp.

◆ test_bidirectional_iterators()

template<class T , class BidirectionalIterator >
void test_bidirectional_iterators ( T  ,
BidirectionalIterator   
)

Definition at line 358 of file 20.operators.cpp.

◆ test_forward_iterators()

template<class T , class ForwardIterator >
void test_forward_iterators ( T  ,
ForwardIterator   
)

Definition at line 297 of file 20.operators.cpp.

◆ test_input_iterators()

template<class T , class InputIterator >
void test_input_iterators ( T  ,
InputIterator   
)

Definition at line 206 of file 20.operators.cpp.

◆ test_iterator() [1/2]

template<class Container >
void test_iterator ( Container  ,
int *   
)

Definition at line 143 of file 20.operators.cpp.

◆ test_iterator() [2/2]

template<class Container , class RandomAccessIterator >
void test_iterator ( Container  ,
RandomAccessIterator   
)

Definition at line 136 of file 20.operators.cpp.

◆ test_output_iterators()

template<class T , class OutputIterator >
void test_output_iterators ( T  ,
OutputIterator   
)

Definition at line 244 of file 20.operators.cpp.

◆ test_random_access_iterators()

template<class T , class RandomAccessIterator >
void test_random_access_iterators ( T  ,
RandomAccessIterator   
)

Definition at line 390 of file 20.operators.cpp.