]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
noncopyable: switch over from boost
authorJustin Viiret <justin.viiret@intel.com>
Thu, 30 Mar 2017 03:37:35 +0000 (14:37 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 05:18:26 +0000 (15:18 +1000)
22 files changed:
CMakeLists.txt
src/compiler/compiler.h
src/fdr/fdr_compile.cpp
src/fdr/teddy_compile.cpp
src/nfa/dfa_min.cpp
src/nfa/goughcompile_internal.h
src/nfagraph/ng.h
src/nfagraph/ng_builder.h
src/nfagraph/ng_is_equal.h
src/nfagraph/ng_violet.cpp
src/parser/buildstate.h
src/rose/rose_build.h
src/rose/rose_build_add.cpp
src/rose/rose_build_bytecode.cpp
src/rose/rose_build_engine_blob.h
src/smallwrite/smallwrite_build.h
src/som/slot_manager.h
src/util/boundary_reports.h
src/util/partitioned_set.h
src/util/queue_index_factory.h
src/util/report_manager.h
src/util/ue2_graph.h

index c7929b34f6c6095b4788ef310a9ab552df3b904d..fbcb53992d75a7b29080b8e45081078f33f039e4 100644 (file)
@@ -1003,6 +1003,7 @@ SET (hs_SRCS
     src/util/math.h
     src/util/multibit_build.cpp
     src/util/multibit_build.h
+    src/util/noncopyable.h
     src/util/operators.h
     src/util/order_check.h
     src/util/partial_store.h
index 8f5f9b65fd6b592cbd5b121c74f00c6e5330ad0e..60d7ca33c0344cecbb937209714ebac86b7d38b7 100644 (file)
@@ -37,9 +37,9 @@
 #include "database.h"
 #include "compiler/expression_info.h"
 #include "parser/Component.h"
+#include "util/noncopyable.h"
 
 #include <memory>
-#include <boost/core/noncopyable.hpp>
 
 struct hs_database;
 struct hs_expr_ext;
@@ -54,7 +54,7 @@ class NGHolder;
 class ReportManager;
 
 /** \brief Class gathering together the pieces of a parsed expression. */
-class ParsedExpression : boost::noncopyable {
+class ParsedExpression : noncopyable {
 public:
     ParsedExpression(unsigned index, const char *expression, unsigned flags,
                      ReportID report, const hs_expr_ext *ext = nullptr);
index 015fa51e2f147ff03ca0cf1e594477ef388f5a37..dc0cc0f3c01bbdb1b6968cde9a93a6268e3666ff 100644 (file)
@@ -44,6 +44,7 @@
 #include "util/compare.h"
 #include "util/dump_mask.h"
 #include "util/math.h"
+#include "util/noncopyable.h"
 #include "util/target_info.h"
 #include "util/ue2string.h"
 #include "util/verify_types.h"
@@ -62,7 +63,6 @@
 #include <string>
 #include <vector>
 
-#include <boost/core/noncopyable.hpp>
 #include <boost/multi_array.hpp>
 
 using namespace std;
@@ -71,7 +71,7 @@ namespace ue2 {
 
 namespace {
 
-class FDRCompiler : boost::noncopyable {
+class FDRCompiler : noncopyable {
 private:
     const FDREngineDescription &eng;
     const Grey &grey;
index 0915528029ececf35400c4a583334a3789400b7b..607024d12739eb78b1c848bde13445049f5895f8 100644 (file)
@@ -35,6 +35,7 @@
 #include "ue2common.h"
 #include "util/alloc.h"
 #include "util/compare.h"
+#include "util/noncopyable.h"
 #include "util/popcount.h"
 #include "util/target_info.h"
 #include "util/verify_types.h"
@@ -55,8 +56,6 @@
 #include <string>
 #include <vector>
 
-#include <boost/core/noncopyable.hpp>
-
 using namespace std;
 
 namespace ue2 {
@@ -65,7 +64,7 @@ namespace {
 
 //#define TEDDY_DEBUG
 
-class TeddyCompiler : boost::noncopyable {
+class TeddyCompiler : noncopyable {
     const TeddyEngineDescription &eng;
     const Grey &grey;
     const vector<hwlmLiteral> &lits;
index 0d3bca114362e279a66238a7ae4ec3cc3a364fbb..f83d1420f46cffc6402d68936632e47b1e1909ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -60,8 +60,9 @@
 #include "nfa/rdfa.h"
 #include "nfagraph/ng_mcclellan.h"
 #include "ue2common.h"
-#include "util/partitioned_set.h"
 #include "util/container.h"
+#include "util/noncopyable.h"
+#include "util/partitioned_set.h"
 #include "util/ue2_containers.h"
 
 #include <algorithm>
@@ -71,7 +72,6 @@
 #include <vector>
 #include <iterator>
 
-#include <boost/core/noncopyable.hpp>
 #include <boost/dynamic_bitset.hpp>
 
 using namespace std;
@@ -84,7 +84,7 @@ struct hopcroft_state_info {
     vector<vector<dstate_id_t> > prev;
 };
 
-struct DFA_components : boost::noncopyable {
+struct DFA_components : noncopyable {
     dstate_id_t nstates;
     size_t inp_size;
     set<size_t> work_queue;
index 52e65f15fa5e36f0023a7bc74113e3e933cd95ff..a6ba0d1b82763771366c5570fb1139c30aff1956 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -33,6 +33,7 @@
 #include "mcclellancompile.h"
 #include "ue2common.h"
 #include "util/charreach.h"
+#include "util/noncopyable.h"
 #include "util/order_check.h"
 #include "util/ue2_containers.h"
 
@@ -41,7 +42,6 @@
 #include <set>
 #include <vector>
 
-#include <boost/core/noncopyable.hpp>
 #include <boost/graph/adjacency_list.hpp>
 
 namespace ue2 {
@@ -103,7 +103,7 @@ struct GoughSSAVarWithInputs;
 struct GoughSSAVarMin;
 struct GoughSSAVarJoin;
 
-struct GoughSSAVar : boost::noncopyable {
+struct GoughSSAVar : noncopyable {
     GoughSSAVar(void) : seen(false), slot(INVALID_SLOT) {}
     virtual ~GoughSSAVar();
     const ue2::flat_set<GoughSSAVar *> &get_inputs() const {
index dc797acf7af33a0a7e7bbf8bcfdb73d1bbc70e7d..a5a5c235a4284e93f87f8c69d407e8cf13a166ab 100644 (file)
@@ -42,6 +42,7 @@
 #include "util/compile_context.h"
 #include "util/depth.h"
 #include "util/graph.h"
+#include "util/noncopyable.h"
 #include "util/report_manager.h"
 #include "util/ue2_containers.h"
 
@@ -51,8 +52,6 @@
 #include <utility>
 #include <vector>
 
-#include <boost/core/noncopyable.hpp>
-
 namespace ue2 {
 
 struct CompileContext;
@@ -62,7 +61,7 @@ class ExpressionInfo;
 class RoseBuild;
 class SmallWriteBuild;
 
-class NG : boost::noncopyable {
+class NG : noncopyable {
 public:
     NG(const CompileContext &in_cc, size_t num_patterns,
        unsigned in_somPrecision);
index df2e0dd8dd9dc632fc9c156d7528fda953494cc0..9f71b62235e89e3658fe4044b7fe116423682a72 100644 (file)
@@ -37,9 +37,9 @@
 #include "ue2common.h"
 
 #include "parser/position.h"
+#include "util/noncopyable.h"
 
 #include <memory>
-#include <boost/core/noncopyable.hpp>
 
 namespace ue2 {
 
@@ -52,7 +52,7 @@ class ParsedExpression;
 
 /** \brief Abstract builder interface. Use \ref makeNFABuilder to construct
  * one. Used by GlushkovBuildState. */
-class NFABuilder : boost::noncopyable {
+class NFABuilder : noncopyable {
 public:
     virtual ~NFABuilder();
 
index 8eba2af591c214980b85e1bf2ae3156465b3e8a6..52b29882fe977aa7ad1bb50bb82377579e71104f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -39,7 +39,6 @@
 #include "ue2common.h"
 
 #include <memory>
-#include <boost/core/noncopyable.hpp>
 
 namespace ue2 {
 
index 1cf3b7163e58bfd8443287284346bcb6277eb0b5..e28256436cf1231658a5ae23c3a35efa5f791783 100644 (file)
@@ -68,7 +68,6 @@
 #include <set>
 #include <utility>
 #include <vector>
-#include <boost/core/noncopyable.hpp>
 #include <boost/dynamic_bitset.hpp>
 #include <boost/range/adaptor/map.hpp>
 
index 8a69f44facfbdf3b8de6bddba1ec1c42a3866572..5ddaf9b23860736cab1d1cbe9f510821532f21b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
 
 #include "ue2common.h"
 #include "position.h"
+#include "util/noncopyable.h"
 
 #include <memory>
 #include <vector>
-#include <boost/core/noncopyable.hpp>
 
 namespace ue2 {
 
@@ -49,7 +49,7 @@ class PositionInfo;
  *
  * Abstract base class; use \ref makeGlushkovBuildState to get one of these you
  * can use. */
-class GlushkovBuildState : boost::noncopyable {
+class GlushkovBuildState : noncopyable {
 public:
     /** \brief Represents an uninitialized state. */
     static const Position POS_UNINITIALIZED;
index 0af8ba57fcbff301059ffe284381ebbdd7715127..2949fcc91951a7f8829c08cb5b042ba81a469e59 100644 (file)
@@ -42,6 +42,7 @@
 #include "rose_in_graph.h"
 #include "util/alloc.h"
 #include "util/charreach.h"
+#include "util/noncopyable.h"
 #include "util/ue2_containers.h"
 #include "util/ue2string.h"
 
@@ -50,8 +51,6 @@
 #include <utility>
 #include <vector>
 
-#include <boost/core/noncopyable.hpp>
-
 struct NFA;
 struct SmallWriteEngine;
 struct RoseEngine;
@@ -80,7 +79,7 @@ public:
 
 /** \brief Abstract interface intended for callers from elsewhere in the tree,
  * real underlying implementation is RoseBuildImpl in rose_build_impl.h. */
-class RoseBuild : boost::noncopyable {
+class RoseBuild : noncopyable {
 public:
     virtual ~RoseBuild();
 
index 01d7d82707e7a6f1b314575ad3de85d65abf2f0e..b53f7c8ac06cee267ee7079d5195f3335e2738af 100644 (file)
@@ -56,6 +56,7 @@
 #include "util/dump_charclass.h"
 #include "util/graph_range.h"
 #include "util/make_unique.h"
+#include "util/noncopyable.h"
 #include "util/order_check.h"
 #include "util/report_manager.h"
 #include "util/ue2string.h"
@@ -68,8 +69,6 @@
 #include <vector>
 #include <utility>
 
-#include <boost/core/noncopyable.hpp>
-
 using namespace std;
 
 namespace ue2 {
@@ -77,7 +76,7 @@ namespace ue2 {
 /**
  * \brief Data used by most of the construction code in this file.
  */
-struct RoseBuildData : boost::noncopyable {
+struct RoseBuildData : noncopyable {
     RoseBuildData(const RoseInGraph &ig_in, bool som_in)
         : ig(ig_in), som(som_in) {}
 
index ea8984080c81531352f31f66fb76ea6a542cc778..6ee08952e5d67fa396e65bf91fd659df643303f6 100644 (file)
@@ -86,6 +86,7 @@
 #include "util/graph_range.h"
 #include "util/make_unique.h"
 #include "util/multibit_build.h"
+#include "util/noncopyable.h"
 #include "util/order_check.h"
 #include "util/popcount.h"
 #include "util/queue_index_factory.h"
@@ -177,7 +178,7 @@ struct RoseResources {
     bool has_eod = false;
 };
 
-struct build_context : boost::noncopyable {
+struct build_context : noncopyable {
     /** \brief information about engines to the left of a vertex */
     map<RoseVertex, left_build_info> leftfix_info;
 
@@ -237,7 +238,7 @@ struct build_context : boost::noncopyable {
 
 /** \brief Data only used during construction of various programs (literal,
  * anchored, delay, etc). */
-struct ProgramBuild : boost::noncopyable {
+struct ProgramBuild : noncopyable {
     /** \brief Mapping from vertex to key, for vertices with a
      * CHECK_NOT_HANDLED instruction. */
     ue2::unordered_map<RoseVertex, u32> handledKeys;
index 9298c37fa58040edfac31af85bc7935303ce6598..61b6b440100be99c9d5a81a74d118e7bbce99eeb 100644 (file)
 #include "util/alloc.h"
 #include "util/container.h"
 #include "util/multibit_build.h"
+#include "util/noncopyable.h"
 #include "util/ue2_containers.h"
 #include "util/verify_types.h"
 
 #include <vector>
 #include <type_traits>
 
-#include <boost/core/noncopyable.hpp>
-
 namespace ue2 {
 
-class RoseEngineBlob : boost::noncopyable {
+class RoseEngineBlob : noncopyable {
 public:
     /** \brief Base offset of engine_blob in the Rose engine bytecode. */
     static constexpr u32 base_offset = ROUNDUP_CL(sizeof(RoseEngine));
index 3d7f3cb630440f15617befd522d218e24d99e1f9..906a83c2cf9a82ac41fdd6c43bb538a2c32df49f 100644 (file)
 
 #include "ue2common.h"
 #include "util/alloc.h"
+#include "util/noncopyable.h"
 
 #include <set>
 
-#include <boost/core/noncopyable.hpp>
-
 struct SmallWriteEngine;
 
 namespace ue2 {
@@ -54,7 +53,7 @@ class ReportManager;
 
 // Abstract interface intended for callers from elsewhere in the tree, real
 // underlying implementation is SmallWriteBuildImpl in smwr_build_impl.h.
-class SmallWriteBuild : boost::noncopyable {
+class SmallWriteBuild : noncopyable {
 public:
     // Destructor
     virtual ~SmallWriteBuild();
index 971ea362315794c15888ccaf7a371b6fd9f8372a..adccf99a8c82b55a18fd1f93bfebeea8d06c9adc 100644 (file)
 #include "ue2common.h"
 #include "nfagraph/ng_holder.h"
 #include "util/alloc.h"
+#include "util/noncopyable.h"
 #include "util/ue2_containers.h"
 
 #include <deque>
 #include <memory>
-#include <boost/core/noncopyable.hpp>
 
 struct NFA;
 
@@ -54,7 +54,7 @@ struct SlotCache;
 /** \brief SOM slot manager. Used to hand out SOM slots and track their
  * relationships during SOM construction. Also stores reverse NFAs used for
  * SOM. */
-class SomSlotManager : boost::noncopyable {
+class SomSlotManager : noncopyable {
 public:
     explicit SomSlotManager(u8 precision);
     ~SomSlotManager();
index 7ad93ba1e456e19c55386f3e876e8fa7497efb89..b2bb1c9b0a335c3dcb10ca53df0fb649abf14637 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
 #define BOUNDARY_REPORTS_H
 
 #include "ue2common.h"
+#include "util/noncopyable.h"
 
 #include <set>
-#include <boost/core/noncopyable.hpp>
 
 namespace ue2 {
 
-struct BoundaryReports : boost::noncopyable {
+struct BoundaryReports : noncopyable {
     std::set<ReportID> report_at_0; /* set of internal reports to fire
                                      * unconditionally at offset 0 */
     std::set<ReportID> report_at_0_eod; /* set of internal reports to fire
index 8f92a8b7527219794c4f69e40531545b6b8a5935..a9e4644d1d996c3c4b2a2f9378180e31feea1a86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
 #define PARTITIONED_SET_H
 
 #include "container.h"
+#include "noncopyable.h"
 #include "ue2_containers.h"
 #include "ue2common.h"
 
 #include <algorithm>
 #include <vector>
 
-#include <boost/core/noncopyable.hpp>
 #include <boost/dynamic_bitset.hpp>
 
 namespace ue2 {
@@ -53,7 +53,7 @@ static constexpr size_t INVALID_SUBSET = ~(size_t)0;
  */
 
 template<typename T>
-class partitioned_set : boost::noncopyable {
+class partitioned_set : noncopyable {
 public:
     class subset {
     public:
index 1360beef5f015a26461874934f6c6f9045ba43bf..e8f7028ec5b5d51aaeb477558214e4a531329f54 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
 #define UTIL_QUEUE_INDEX_FACTORY_H
 
 #include "ue2common.h"
-
-#include <boost/core/noncopyable.hpp>
+#include "util/noncopyable.h"
 
 namespace ue2 {
 
-class QueueIndexFactory : boost::noncopyable {
+class QueueIndexFactory : noncopyable {
 public:
     QueueIndexFactory() : val(0) {}
     u32 get_queue() { return val++; }
index 4b62e4b52b8f2a323d1ac9256ecae100d52ece35..f76aff22c29845410d072a6d26ec7aacc2c57461 100644 (file)
 
 #include "ue2common.h"
 #include "util/compile_error.h"
+#include "util/noncopyable.h"
 #include "util/report.h"
 
 #include <map>
 #include <set>
 #include <vector>
-#include <boost/core/noncopyable.hpp>
 
 namespace ue2 {
 
@@ -57,7 +57,7 @@ struct external_report_info {
 };
 
 /** \brief Tracks Report structures, exhaustion and dedupe keys. */
-class ReportManager : boost::noncopyable {
+class ReportManager : noncopyable {
 public:
     explicit ReportManager(const Grey &g);
 
index 7526cad53402dbe7e8c41e04de507d65c987c7be..138d7467d52c81d409b11cc3468deaf76b26f645 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "ue2common.h"
 #include "util/graph_range.h"
+#include "util/noncopyable.h"
 #include "util/operators.h"
 
 #include <boost/functional/hash.hpp>
@@ -156,7 +157,7 @@ namespace ue2 {
 
 namespace graph_detail {
 
-class graph_base : boost::noncopyable {
+class graph_base : noncopyable {
 };
 
 struct default_edge_property {