2018-07-26 Jonathan Wakely <jwakely@redhat.com>
+ * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
+ (random_condition, throw_value_random, throw_allocator_random)
+ (std::hash<throw_value_random>): Do not define when <tr1/random> is
+ not usable.
+ * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
+ define transactional memory support when <stdint.h> is not usable.
+
* include/bits/hashtable_policy.h (__detail::__clp2): Use faster
implementation that doesn't depend on <stdint.h> types.
* include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
}
};
-
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
/**
* @brief Base class for random probability control and throw.
*/
return _S_e;
}
};
-
+#endif // _GLIBCXX_USE_C99_STDINT_TR1
/**
* @brief Class with exception generation control. Intended to be
#endif
};
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
/// Type throwing via random condition.
struct throw_value_random : public throw_value_base<random_condition>
{
operator=(throw_value_random&&) = default;
#endif
};
-
+#endif // _GLIBCXX_USE_C99_STDINT_TR1
/**
* @brief Allocator class with logging and exception generation control.
~throw_allocator_limit() _GLIBCXX_USE_NOEXCEPT { }
};
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
/// Allocator throwing via random condition.
template<typename _Tp>
struct throw_allocator_random
~throw_allocator_random() _GLIBCXX_USE_NOEXCEPT { }
};
+#endif // _GLIBCXX_USE_C99_STDINT_TR1
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
}
};
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
/// Explicit specialization of std::hash for __gnu_cxx::throw_value_random.
template<>
struct hash<__gnu_cxx::throw_value_random>
return __result;
}
};
+#endif
} // end namespace std
#endif
// declared transaction-safe, so we just don't provide transactional clones
// in this case.
#if _GLIBCXX_USE_WEAK_REF
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
extern "C" {
}
+#endif // _GLIBCXX_USE_C99_STDINT_TR1
#endif // _GLIBCXX_USE_WEAK_REF