if `std::is_nothrow_move_constructible<small_vector<peer_shard_t, 2>>`
also depends on if the allocator throws when moving from a small_vector
to a new one, as we need to allocate memory for the destination
small_vector.
so, in this change, the optimization for small_vector is dropped,
because the default allocator used by small_vector throws.
Signed-off-by: Kefu Chai <kchai@redhat.com>
#pragma once
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 106900
-#include <boost/container/small_vector.hpp>
-#else
#include <vector>
-#endif
namespace crimson::osd {
struct peer_shard_t {
pg_shard_t shard;
eversion_t last_complete_ondisk;
};
-#if BOOST_VERSION >= 106900
- // small_vector is is_nothrow_move_constructible<> since 1.69
- // 2 + 1 = 3, which is the default value of "osd_pool_default_size"
- using acked_peers_t = boost::container::small_vector<peer_shard_t, 2>;
-#else
using acked_peers_t = std::vector<peer_shard_t>;
-#endif
}