[build] switch to c++11

Conflicts:
	Makefile.in
	chunker/cache_stream.cc
	chunker/cache_stream.h
	thin-provisioning/thin_archive.cc
	thin-provisioning/thin_show_duplicates.cc
	unit-tests/Makefile.in
This commit is contained in:
Joe Thornber
2016-02-04 09:02:42 +00:00
parent 639af9c3bf
commit 767c39cf71
14 changed files with 31 additions and 30 deletions

View File

@@ -129,7 +129,7 @@ TEST_F(BtreeTests, insert_works)
tree->insert(key, value);
btree<1, uint64_traits>::maybe_value l = tree->lookup(key);
ASSERT_TRUE(l);
ASSERT_TRUE(!!l);
ASSERT_THAT(*l, Eq(i));
}
@@ -153,7 +153,7 @@ TEST_F(BtreeTests, insert_does_not_insert_imaginary_values)
tree->insert(key, value);
l = tree->lookup(key);
ASSERT_TRUE(l);
ASSERT_TRUE(!!l);
ASSERT_THAT(*l, Eq(100u));
key[0] = 1;
@@ -183,7 +183,7 @@ TEST_F(BtreeTests, clone)
uint64_t value = i * 7;
l = tree->lookup(key);
ASSERT_TRUE(l);
ASSERT_TRUE(!!l);
ASSERT_THAT(*l, Eq(value));
}
@@ -200,11 +200,11 @@ TEST_F(BtreeTests, clone)
uint64_t value = i * 7;
l = tree->lookup(key);
ASSERT_TRUE(l);
ASSERT_TRUE(!!l);
ASSERT_THAT(*l, Eq(value));
l = copy->lookup(key);
ASSERT_TRUE(l);
ASSERT_TRUE(!!l);
ASSERT_THAT(*l, Eq(value));
}
@@ -216,7 +216,7 @@ TEST_F(BtreeTests, clone)
ASSERT_FALSE(l);
l = copy->lookup(key);
ASSERT_TRUE(l);
ASSERT_TRUE(!!l);
ASSERT_THAT(*l, Eq(value));
}

View File

@@ -36,7 +36,7 @@ namespace {
TEST_F(RunSetTests, create)
{
auto_ptr<run_set<unsigned> > rs(new run_set<unsigned>());
unique_ptr<run_set<unsigned> > rs(new run_set<unsigned>());
}
TEST_F(RunSetTests, add_single_blocks)

View File

@@ -101,7 +101,7 @@ namespace {
for (unsigned i = 0; i < NR_BLOCKS; i++) {
boost::optional<block_address> mb = sm->new_block();
ASSERT_TRUE(mb);
ASSERT_TRUE(!!mb);
ASSERT_THAT(sm->get_nr_free(), Eq(NR_BLOCKS - i - 1));
}
@@ -137,7 +137,7 @@ namespace {
void test_not_allocated_twice(space_map::ptr sm) {
boost::optional<block_address> mb = sm->new_block();
ASSERT_TRUE(mb);
ASSERT_TRUE(!!mb);
for (;;) {
boost::optional<block_address> b = sm->new_block();

View File

@@ -111,7 +111,7 @@ namespace test {
throw std::runtime_error("system failed");
}
std::auto_ptr<with_directory> dir_;
std::unique_ptr<with_directory> dir_;
};
//--------------------------------