[caching/hint_array.cc] Fix ambigious array (C++11)
Template array exist in the namespace persistent_data as well as in std of C++11. Explicitly use the one from persistent_data. This fixes compilation bugs with CXXFLAGS=-std=gnu++11 together with gcc 4.8.3 and boost 1.55.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace {
|
|||||||
template <uint32_t WIDTH>
|
template <uint32_t WIDTH>
|
||||||
boost::shared_ptr<array_base> mk_array(transaction_manager &tm) {
|
boost::shared_ptr<array_base> mk_array(transaction_manager &tm) {
|
||||||
typedef hint_traits<WIDTH> traits;
|
typedef hint_traits<WIDTH> traits;
|
||||||
typedef array<traits> ha;
|
typedef persistent_data::array<traits> ha;
|
||||||
|
|
||||||
boost::shared_ptr<array_base> r = typename ha::ptr(new ha(tm, typename traits::ref_counter()));
|
boost::shared_ptr<array_base> r = typename ha::ptr(new ha(tm, typename traits::ref_counter()));
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ namespace {
|
|||||||
template <uint32_t WIDTH>
|
template <uint32_t WIDTH>
|
||||||
boost::shared_ptr<array_base> mk_array(transaction_manager &tm, block_address root, unsigned nr_entries) {
|
boost::shared_ptr<array_base> mk_array(transaction_manager &tm, block_address root, unsigned nr_entries) {
|
||||||
typedef hint_traits<WIDTH> traits;
|
typedef hint_traits<WIDTH> traits;
|
||||||
typedef array<traits> ha;
|
typedef persistent_data::array<traits> ha;
|
||||||
|
|
||||||
boost::shared_ptr<array_base> r = typename ha::ptr(new ha(tm, typename traits::ref_counter(), root, nr_entries));
|
boost::shared_ptr<array_base> r = typename ha::ptr(new ha(tm, typename traits::ref_counter(), root, nr_entries));
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ namespace {
|
|||||||
template <uint32_t WIDTH>
|
template <uint32_t WIDTH>
|
||||||
void get_hint(boost::shared_ptr<array_base> base, unsigned index, vector<unsigned char> &data) {
|
void get_hint(boost::shared_ptr<array_base> base, unsigned index, vector<unsigned char> &data) {
|
||||||
typedef hint_traits<WIDTH> traits;
|
typedef hint_traits<WIDTH> traits;
|
||||||
typedef array<traits> ha;
|
typedef persistent_data::array<traits> ha;
|
||||||
|
|
||||||
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
||||||
data = a->get(index);
|
data = a->get(index);
|
||||||
@@ -122,7 +122,7 @@ namespace {
|
|||||||
template <uint32_t WIDTH>
|
template <uint32_t WIDTH>
|
||||||
void set_hint(boost::shared_ptr<array_base> base, unsigned index, vector<unsigned char> const &data) {
|
void set_hint(boost::shared_ptr<array_base> base, unsigned index, vector<unsigned char> const &data) {
|
||||||
typedef hint_traits<WIDTH> traits;
|
typedef hint_traits<WIDTH> traits;
|
||||||
typedef array<traits> ha;
|
typedef persistent_data::array<traits> ha;
|
||||||
|
|
||||||
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
||||||
a->set(index, data);
|
a->set(index, data);
|
||||||
@@ -142,7 +142,7 @@ namespace {
|
|||||||
template <uint32_t WIDTH>
|
template <uint32_t WIDTH>
|
||||||
void grow(boost::shared_ptr<array_base> base, unsigned new_nr_entries, vector<unsigned char> const &value) {
|
void grow(boost::shared_ptr<array_base> base, unsigned new_nr_entries, vector<unsigned char> const &value) {
|
||||||
typedef hint_traits<WIDTH> traits;
|
typedef hint_traits<WIDTH> traits;
|
||||||
typedef array<traits> ha;
|
typedef persistent_data::array<traits> ha;
|
||||||
|
|
||||||
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
||||||
a->grow(new_nr_entries, value);
|
a->grow(new_nr_entries, value);
|
||||||
@@ -196,7 +196,7 @@ namespace {
|
|||||||
template <uint32_t WIDTH>
|
template <uint32_t WIDTH>
|
||||||
void walk_hints(boost::shared_ptr<array_base> base, hint_visitor &hv, damage_visitor &dv) {
|
void walk_hints(boost::shared_ptr<array_base> base, hint_visitor &hv, damage_visitor &dv) {
|
||||||
typedef hint_traits<WIDTH> traits;
|
typedef hint_traits<WIDTH> traits;
|
||||||
typedef array<traits> ha;
|
typedef persistent_data::array<traits> ha;
|
||||||
|
|
||||||
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
boost::shared_ptr<ha> a = downcast_array<ha>(base);
|
||||||
value_adapter vv(hv);
|
value_adapter vv(hv);
|
||||||
|
Reference in New Issue
Block a user