summaryrefslogtreecommitdiff
path: root/boost/spirit/home/support/detail/lexer/generator.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 11:24:46 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 11:25:39 +0900
commit4fadd968fa12130524c8380f33fcfe25d4de79e5 (patch)
treefd26a490cd15388d42fc6652b3c5c13012e7f93e /boost/spirit/home/support/detail/lexer/generator.hpp
parentb5c87084afaef42b2d058f68091be31988a6a874 (diff)
downloadboost-upstream/1.65.0.tar.gz
boost-upstream/1.65.0.tar.bz2
boost-upstream/1.65.0.zip
Imported Upstream version 1.65.0upstream/1.65.0
Change-Id: Icf8400b375482cb11bcf77440a6934ba360d6ba4 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/spirit/home/support/detail/lexer/generator.hpp')
-rw-r--r--boost/spirit/home/support/detail/lexer/generator.hpp47
1 files changed, 13 insertions, 34 deletions
diff --git a/boost/spirit/home/support/detail/lexer/generator.hpp b/boost/spirit/home/support/detail/lexer/generator.hpp
index daa06e7944..103c834978 100644
--- a/boost/spirit/home/support/detail/lexer/generator.hpp
+++ b/boost/spirit/home/support/detail/lexer/generator.hpp
@@ -16,6 +16,7 @@
#include "parser/tree/node.hpp"
#include "parser/parser.hpp"
#include "containers/ptr_list.hpp"
+#include <boost/move/unique_ptr.hpp>
#include "rules.hpp"
#include "state_machine.hpp"
@@ -116,10 +117,10 @@ public:
protected:
typedef detail::basic_charset<CharT> charset;
typedef detail::ptr_list<charset> charset_list;
- typedef std::auto_ptr<charset> charset_ptr;
+ typedef boost::movelib::unique_ptr<charset> charset_ptr;
typedef detail::equivset equivset;
typedef detail::ptr_list<equivset> equivset_list;
- typedef std::auto_ptr<equivset> equivset_ptr;
+ typedef boost::movelib::unique_ptr<equivset> equivset_ptr;
typedef typename charset::index_set index_set;
typedef std::vector<index_set> index_set_vector;
typedef detail::basic_parser<CharT> parser;
@@ -377,8 +378,8 @@ protected:
if (followpos_->empty ()) return npos;
std::size_t index_ = 0;
- std::auto_ptr<node_set> set_ptr_ (new node_set);
- std::auto_ptr<node_vector> vector_ptr_ (new node_vector);
+ boost::movelib::unique_ptr<node_set> set_ptr_ (new node_set);
+ boost::movelib::unique_ptr<node_vector> vector_ptr_ (new node_vector);
for (typename detail::node::node_vector::const_iterator iter_ =
followpos_->begin (), end_ = followpos_->end ();
@@ -494,21 +495,13 @@ protected:
delete *l_iter_;
*l_iter_ = overlap_.release ();
- // VC++ 6 Hack:
- charset_ptr temp_overlap_ (new charset);
-
- overlap_ = temp_overlap_;
+ overlap_.reset (new charset);
++iter_;
}
else if (r_->empty ())
{
- delete r_.release ();
- r_ = overlap_;
-
- // VC++ 6 Hack:
- charset_ptr temp_overlap_ (new charset);
-
- overlap_ = temp_overlap_;
+ overlap_.swap (r_);
+ overlap_.reset (new charset);
break;
}
else
@@ -517,10 +510,7 @@ protected:
static_cast<charset *>(0));
*iter_ = overlap_.release ();
- // VC++ 6 Hack:
- charset_ptr temp_overlap_ (new charset);
-
- overlap_ = temp_overlap_;
+ overlap_.reset(new charset);
++iter_;
end_ = lhs_->end ();
}
@@ -642,21 +632,13 @@ protected:
delete *l_iter_;
*l_iter_ = overlap_.release ();
- // VC++ 6 Hack:
- equivset_ptr temp_overlap_ (new equivset);
-
- overlap_ = temp_overlap_;
+ overlap_.reset (new equivset);
++iter_;
}
else if (r_->empty ())
{
- delete r_.release ();
- r_ = overlap_;
-
- // VC++ 6 Hack:
- equivset_ptr temp_overlap_ (new equivset);
-
- overlap_ = temp_overlap_;
+ overlap_.swap (r_);
+ overlap_.reset (new equivset);
break;
}
else
@@ -665,10 +647,7 @@ protected:
static_cast<equivset *>(0));
*iter_ = overlap_.release ();
- // VC++ 6 Hack:
- equivset_ptr temp_overlap_ (new equivset);
-
- overlap_ = temp_overlap_;
+ overlap_.reset (new equivset);
++iter_;
end_ = lhs_->end ();
}