get compiling on g++ 4.4

This commit is contained in:
Joe Thornber 2011-08-25 10:54:43 +01:00
parent 04d7b7ce5b
commit dfe3275eac
4 changed files with 7 additions and 7 deletions

View File

@ -15,8 +15,8 @@ TEST_SOURCE=\
OBJECTS=$(subst .cc,.o,$(SOURCE))
TEST_PROGRAMS=$(subst .cc,,$(TEST_SOURCE))
TOP_DIR:=$(PWD)
CPPFLAGS=-Wall -g -I$(TOP_DIR)
#CPPFLAGS=-Wall -std=c++0x -g -I$(TOP_DIR)
#CPPFLAGS=-Wall -g -I$(TOP_DIR)
CPPFLAGS=-Wall -std=c++0x -g -I$(TOP_DIR)
LIBS=-lstdc++
.PHONEY: unit-tests test-programs

View File

@ -21,10 +21,10 @@ namespace persistent_data {
//----------------------------------------------------------------
class block_counter {
public:
typedef typename std::map<block_address, unsigned> count_map;
typedef std::map<block_address, unsigned> count_map;
void inc(block_address b) {
typename count_map::iterator it = counts_.find(b);
count_map::iterator it = counts_.find(b);
if (it == counts_.end())
counts_.insert(make_pair(b, 1));
#if 0

View File

@ -183,7 +183,7 @@ metadata::metadata(std::string const &dev_path)
: tm_(open_tm(dev_path)),
sb_(read_superblock(tm_->get_bm())),
data_sm_(open_disk_sm<MD_BLOCK_SIZE>(tm_, static_cast<void *>(&sb_.data_space_map_root_))),
details_(tm_, sb_.device_details_root_, typename device_details_traits::ref_counter()),
details_(tm_, sb_.device_details_root_, device_details_traits::ref_counter()),
mappings_top_level_(tm_, sb_.data_mapping_root_, mtree_ref_counter<MD_BLOCK_SIZE>(tm_)),
mappings_(tm_, sb_.data_mapping_root_, block_time_ref_counter(data_sm_))
{

View File

@ -146,8 +146,8 @@ namespace thin_provisioning {
class metadata {
public:
typedef boost::shared_ptr<metadata> ptr;
typedef typename block_manager<MD_BLOCK_SIZE>::read_ref read_ref;
typedef typename block_manager<MD_BLOCK_SIZE>::write_ref write_ref;
typedef block_manager<MD_BLOCK_SIZE>::read_ref read_ref;
typedef block_manager<MD_BLOCK_SIZE>::write_ref write_ref;
metadata(std::string const &dev_path);
~metadata();