Use pre-review copy of unordered for trunk.

[SVN r42183]
This commit is contained in:
Daniel James
2007-12-19 22:42:12 +00:00
parent 3f2f75faf6
commit 56f91ea407
26 changed files with 508 additions and 1164 deletions
@@ -42,9 +42,6 @@ namespace boost {
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template <class T>
inline void reset(T& x) { x = T(); }
template <class Ptr>
inline Ptr null_ptr() { return Ptr(); }
#else
template <class T>
inline void reset_impl(T& x, ...) { x = T(); }
@@ -52,9 +49,6 @@ namespace boost {
inline void reset_impl(T*& x, int) { x = 0; }
template <class T>
inline void reset(T& x) { reset_impl(x); }
template <class Ptr>
inline Ptr null_ptr() { Ptr x; reset(x); return x; }
#endif
// Work around for Microsoft's ETI bug.
@@ -82,21 +82,17 @@ namespace boost {
// no throw
inline std::size_t next_prime(std::size_t n) {
std::size_t const* const prime_list_end = prime_list +
sizeof(prime_list) / sizeof(*prime_list);
std::size_t const* bound =
std::lower_bound(prime_list,prime_list_end, n);
if(bound == prime_list_end)
std::lower_bound(prime_list,prime_list + 28, n);
if(bound == prime_list + 28)
bound--;
return *bound;
}
// no throw
inline std::size_t prev_prime(std::size_t n) {
std::size_t const* const prime_list_end = prime_list +
sizeof(prime_list) / sizeof(*prime_list);
std::size_t const* bound =
std::upper_bound(prime_list,prime_list_end, n);
std::upper_bound(prime_list,prime_list + 28, n);
if(bound != prime_list)
bound--;
return *bound;
File diff suppressed because it is too large Load Diff