Skip to content

Commit

Permalink
Ent 2470 update to be compliant with cpp17 (#3)
Browse files Browse the repository at this point in the history
Replaced the use of auto_ptr to unique_ptr to be compliant with latest c++ standards.
  • Loading branch information
ab-dragon authored May 14, 2021
1 parent dd321b8 commit 99ecc36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/owlcpp/detail/object_id_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of owlcpp project.
#ifndef OBJECT_ID_BASE_HPP_
#define OBJECT_ID_BASE_HPP_
#include <iosfwd>
#include <cstddef>
#include "boost/cstdint.hpp"

namespace owlcpp{ namespace detail{
Expand Down
4 changes: 2 additions & 2 deletions include/owlcpp/rdf/map_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Map_node {
typedef Node_id id_type;
typedef Node node_type;
private:
typedef std::auto_ptr<node_type> ptr_t;
typedef std::unique_ptr<node_type> ptr_t;
typedef boost::ptr_vector<boost::nullable<Node> > vector_t;
typedef boost::unordered_map<
Node const*,
Expand Down Expand Up @@ -192,7 +192,7 @@ class Map_node {
return insert(Node_blank(n, doc));
}

std::auto_ptr<Node> remove(const Node_id id) {
std::unique_ptr<Node> remove(const Node_id id) {
BOOST_ASSERT(find(id));
const std::size_t n = map_.erase(&get(id));
boost::ignore_unused_variable_warning(n);
Expand Down
2 changes: 1 addition & 1 deletion lib/logic/factpp/expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ template<class T> struct Expression {
struct Err : public Logic_err {};
typedef Expression self_t;
typedef T expression_type;
typedef std::auto_ptr<self_t> ptr_t;
typedef std::unique_ptr<self_t> ptr_t;
typedef typename expression_type::fact_type generated_t;
virtual generated_t get(ReasoningKernel& k) const = 0;
virtual std::string string() const {return "Expression";}
Expand Down

0 comments on commit 99ecc36

Please sign in to comment.