Issue #100 remove auto_ptr and c++03 support.

Problem:
auto_ptr is deprecated.

Solution:
use unique_ptr which is only available in c++11 and newer.
Also fix how unit tests are run as part of the build to keep them from being
deleted when they fail.

Testing:
Unit tests on linux run.
This commit is contained in:
Dixon, Scott
2018-06-14 11:07:14 -07:00
parent dfcdf22eda
commit 4750a50099
15 changed files with 35 additions and 58 deletions
@@ -3,8 +3,6 @@
*/
#if __GNUC__
// We need auto_ptr for compatibility reasons
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
@@ -57,8 +55,8 @@ TEST(dynamic_node_id_server_RaftCore, Basic)
InterlinkedTestNodesWithSysClock nodes;
std::auto_ptr<RaftCore> raft_a(new RaftCore(nodes.a, storage_a, tracer_a, commit_handler_a));
std::auto_ptr<RaftCore> raft_b(new RaftCore(nodes.b, storage_b, tracer_b, commit_handler_b));
std::unique_ptr<RaftCore> raft_a(new RaftCore(nodes.a, storage_a, tracer_a, commit_handler_a));
std::unique_ptr<RaftCore> raft_b(new RaftCore(nodes.b, storage_b, tracer_b, commit_handler_b));
/*
* Initialization