/usr/include/NTL/pair.h is in libntl-dev 5.4.2-4.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #ifndef NTL_pair__H
#define NTL_pair__H
#include <NTL/tools.h>
#define NTL_pair_decl(S,T,pair_S_T) \
class pair_S_T { \
public: \
S a; \
T b; \
\
pair_S_T() { } \
pair_S_T(const pair_S_T& l__x) : a(l__x.a), b(l__x.b) { } \
pair_S_T& operator=(const pair_S_T& l__x) { a = l__x.a; b = l__x.b; return *this; } \
pair_S_T(const S& l__x, const T& l__y) : a(l__x), b(l__y) { } \
~pair_S_T() { } \
}; \
\
inline pair_S_T cons(const S& l__x, const T& l__y) { return pair_S_T(l__x, l__y); } \
#define NTL_pair_io_decl(S,T,pair_S_T) \
NTL_SNS istream& operator>>(NTL_SNS istream&, pair_S_T&); \
\
NTL_SNS ostream& operator<<(NTL_SNS ostream&, const pair_S_T&); \
#define NTL_pair_eq_decl(S,T,pair_S_T) \
inline long operator==(const pair_S_T& l__x, const pair_S_T& l__y) \
{ return l__x.a == l__y.a && l__x.b == l__y.b; } \
inline long operator!=(const pair_S_T& l__x, const pair_S_T& l__y) \
{ return !(l__x == l__y); } \
// For compatability...
#define NTL_pair_impl(S,T,pair_S_T)
#define NTL_pair_io_impl(S,T,pair_S_T) \
NTL_SNS istream& operator>>(NTL_SNS istream& l__s, pair_S_T& l__x) \
{ \
long l__c; \
\
if (!l__s) NTL_NNS Error("bad pair input"); \
\
l__c = l__s.peek(); \
while (NTL_NNS IsWhiteSpace(l__c)) { \
l__s.get(); \
l__c = l__s.peek(); \
} \
\
if (l__c != '[') \
NTL_NNS Error("bad pair input"); \
\
l__s.get(); \
\
if (!(l__s >> l__x.a)) \
NTL_NNS Error("bad pair input"); \
if (!(l__s >> l__x.b)) \
NTL_NNS Error("bad pair input"); \
\
l__c = l__s.peek(); \
while (NTL_NNS IsWhiteSpace(l__c)) { \
l__s.get(); \
l__c = l__s.peek(); \
} \
\
if (l__c != ']') \
NTL_NNS Error("bad pair input"); \
\
l__s.get(); \
\
return l__s; \
} \
\
NTL_SNS ostream& operator<<(NTL_SNS ostream& l__s, const pair_S_T& l__x) \
{ \
return l__s << "[" << l__x.a << " " << l__x.b << "]"; \
} \
// For compatability...
#define NTL_pair_eq_impl(S,T,pair_S_T)
#endif
|