24 #ifndef _GLIBCXX_CMATH
49 #define INPLACE_RECONSTRUCT(type,this) \
55 #define INPLACE_COPY_RECONSTRUCT(type,this,other) \
58 ::new(this) type(other); \
61 #define DECLARE_ASSIGNMENT_OPERATOR(T) \
62 T& operator = (const T& other) { \
63 INPLACE_COPY_RECONSTRUCT(T, this, other); \
78 operator T*()
const {
return ptr; }
112 #define DEFINE_NAMED_ITERATORS(type,name) \
113 typedef type::iterator name##Iter; \
114 typedef type::const_iterator name##CIter; \
115 typedef type::reverse_iterator name##RIter; \
116 typedef type::const_reverse_iterator name##CRIter
118 #define DEFINE_ITERATORS(type) DEFINE_NAMED_ITERATORS(type,type)
123 #define CASTSIG(sig,cb) ((sig)((void*)(cb)))
134 LocallyModify(
T& var_,
T localValue) : var(var_), prevValue(var) { var = localValue; }
157 template <
typename DERIVED,
typename BASE>
168 user_ptr =
static_cast<DERIVED*
>(forwarded_ptr);
183 return d<0 ? -1 : (d>0 ? 1 : 0);
190 return f<0 ? -1 : (f>0 ? 1 : 0);
197 return L<0 ? -1 : (L>0 ? 1 : 0);
204 template <
typename NUM>
207 return val ? log10(val)+1 : 1;
209 template <
typename NUM>
216 #error arbtools.h included twice
const T * plain_pointer() const
convert RefPtr to plain old pointer
RefPtr(const RefPtr< T > &other)
~StrictlyAliased_BasePtrRef()
const T & operator*() const
DECLARE_ASSIGNMENT_OPERATOR(RefPtr< T >)
StrictlyAliased_BasePtrRef(DERIVED *&ptr)
const T * operator->() const
different_types< T, U > wrong_type_used
LocallyModify(T &var_, T localValue)