File: vcl_rel_ops.not

package info (click to toggle)
insighttoolkit 3.6.0-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 94,956 kB
  • ctags: 74,981
  • sloc: cpp: 355,621; ansic: 195,070; fortran: 28,713; python: 3,802; tcl: 1,996; sh: 1,175; java: 583; makefile: 415; csh: 184; perl: 175
file content (70 lines) | stat: -rw-r--r-- 1,954 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef vcl_rel_ops_h_
#define vcl_rel_ops_h_
/*
  fsm
*/

// PLEASE DON'T USE THIS HEADER FILE. If you are using a class
// type, A, which provides operator== but not operator!= you
// can do
//   #include <utility>
//   using std::operator!=;
//
// before you do
//   if (x != y) { ...
//
// but if one reflects on it dispassionately, it should be clear
// that this solution is much more verbose than the obvious one,
// which is to just write
//   if (!(x == y)) { ...
//
// instead. If you find you need operator!= a lot, it is better
// to provide an operator!= near the declaration of class A, to
// save the user the trouble of #including <utility> and typing
// a `using' statement.
//
// See also http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html
#include <vcl_deprecated_header.h> 

#include "vcl_compiler.h"

#if !VCL_USE_NATIVE_STL
# include "emulation/vcl_rel_ops.h"

#elif defined(VCL_GCC) && defined(VCL_CXX_HAS_HEADER_FUNCTIONAL)
# include "vcl_utility.h"
# if defined(VCL_GCC_30)
using std::rel_ops::operator!=;
using std::rel_ops::operator>;
using std::rel_ops::operator<=;
using std::rel_ops::operator>=;
# else
using std::operator!=;
using std::operator>;
using std::operator<=;
using std::operator>=;
# endif

#elif defined(VCL_SGI_CC)
# include "vcl_utility.h"
using std::operator!=;
using std::operator>;
using std::operator<=;
using std::operator>=;

#else // -------------------- ISO
# include "vcl_utility.h"
using std::rel_ops::operator!=;
using std::rel_ops::operator>;
using std::rel_ops::operator<=;
using std::rel_ops::operator>=;
#endif

// instantiation macro for compilers that need it.
#define VCL_REL_OPS_INSTANTIATE(T) \
VCL_INSTANTIATE_INLINE(bool operator != (T const &, T const &)); \
VCL_INSTANTIATE_INLINE(bool operator >  (T const &, T const &)); \
VCL_INSTANTIATE_INLINE(bool operator <= (T const &, T const &)); \
VCL_INSTANTIATE_INLINE(bool operator >= (T const &, T const &))

#endif // vcl_rel_ops_h_