diff --git a/CMakeLists.txt b/CMakeLists.txt index c7929b34..fbcb5399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/compiler/compiler.h b/src/compiler/compiler.h index 8f5f9b65..60d7ca33 100644 --- a/src/compiler/compiler.h +++ b/src/compiler/compiler.h @@ -37,9 +37,9 @@ #include "database.h" #include "compiler/expression_info.h" #include "parser/Component.h" +#include "util/noncopyable.h" #include -#include 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); diff --git a/src/fdr/fdr_compile.cpp b/src/fdr/fdr_compile.cpp index 015fa51e..dc0cc0f3 100644 --- a/src/fdr/fdr_compile.cpp +++ b/src/fdr/fdr_compile.cpp @@ -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 #include -#include #include using namespace std; @@ -71,7 +71,7 @@ namespace ue2 { namespace { -class FDRCompiler : boost::noncopyable { +class FDRCompiler : noncopyable { private: const FDREngineDescription ŋ const Grey &grey; diff --git a/src/fdr/teddy_compile.cpp b/src/fdr/teddy_compile.cpp index 09155280..607024d1 100644 --- a/src/fdr/teddy_compile.cpp +++ b/src/fdr/teddy_compile.cpp @@ -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 #include -#include - using namespace std; namespace ue2 { @@ -65,7 +64,7 @@ namespace { //#define TEDDY_DEBUG -class TeddyCompiler : boost::noncopyable { +class TeddyCompiler : noncopyable { const TeddyEngineDescription ŋ const Grey &grey; const vector &lits; diff --git a/src/nfa/dfa_min.cpp b/src/nfa/dfa_min.cpp index 0d3bca11..f83d1420 100644 --- a/src/nfa/dfa_min.cpp +++ b/src/nfa/dfa_min.cpp @@ -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 @@ -71,7 +72,6 @@ #include #include -#include #include using namespace std; @@ -84,7 +84,7 @@ struct hopcroft_state_info { vector > prev; }; -struct DFA_components : boost::noncopyable { +struct DFA_components : noncopyable { dstate_id_t nstates; size_t inp_size; set work_queue; diff --git a/src/nfa/goughcompile_internal.h b/src/nfa/goughcompile_internal.h index 52e65f15..a6ba0d1b 100644 --- a/src/nfa/goughcompile_internal.h +++ b/src/nfa/goughcompile_internal.h @@ -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 #include -#include #include 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 &get_inputs() const { diff --git a/src/nfagraph/ng.h b/src/nfagraph/ng.h index dc797acf..a5a5c235 100644 --- a/src/nfagraph/ng.h +++ b/src/nfagraph/ng.h @@ -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 #include -#include - 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); diff --git a/src/nfagraph/ng_builder.h b/src/nfagraph/ng_builder.h index df2e0dd8..9f71b622 100644 --- a/src/nfagraph/ng_builder.h +++ b/src/nfagraph/ng_builder.h @@ -37,9 +37,9 @@ #include "ue2common.h" #include "parser/position.h" +#include "util/noncopyable.h" #include -#include 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(); diff --git a/src/nfagraph/ng_is_equal.h b/src/nfagraph/ng_is_equal.h index 8eba2af5..52b29882 100644 --- a/src/nfagraph/ng_is_equal.h +++ b/src/nfagraph/ng_is_equal.h @@ -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 -#include namespace ue2 { diff --git a/src/nfagraph/ng_violet.cpp b/src/nfagraph/ng_violet.cpp index 1cf3b716..e2825643 100644 --- a/src/nfagraph/ng_violet.cpp +++ b/src/nfagraph/ng_violet.cpp @@ -68,7 +68,6 @@ #include #include #include -#include #include #include diff --git a/src/parser/buildstate.h b/src/parser/buildstate.h index 8a69f44f..5ddaf9b2 100644 --- a/src/parser/buildstate.h +++ b/src/parser/buildstate.h @@ -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: @@ -35,10 +35,10 @@ #include "ue2common.h" #include "position.h" +#include "util/noncopyable.h" #include #include -#include 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; diff --git a/src/rose/rose_build.h b/src/rose/rose_build.h index 0af8ba57..2949fcc9 100644 --- a/src/rose/rose_build.h +++ b/src/rose/rose_build.h @@ -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 #include -#include - 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(); diff --git a/src/rose/rose_build_add.cpp b/src/rose/rose_build_add.cpp index 01d7d827..b53f7c8a 100644 --- a/src/rose/rose_build_add.cpp +++ b/src/rose/rose_build_add.cpp @@ -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 #include -#include - 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) {} diff --git a/src/rose/rose_build_bytecode.cpp b/src/rose/rose_build_bytecode.cpp index ea898408..6ee08952 100644 --- a/src/rose/rose_build_bytecode.cpp +++ b/src/rose/rose_build_bytecode.cpp @@ -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 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 handledKeys; diff --git a/src/rose/rose_build_engine_blob.h b/src/rose/rose_build_engine_blob.h index 9298c37f..61b6b440 100644 --- a/src/rose/rose_build_engine_blob.h +++ b/src/rose/rose_build_engine_blob.h @@ -35,17 +35,16 @@ #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 #include -#include - 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)); diff --git a/src/smallwrite/smallwrite_build.h b/src/smallwrite/smallwrite_build.h index 3d7f3cb6..906a83c2 100644 --- a/src/smallwrite/smallwrite_build.h +++ b/src/smallwrite/smallwrite_build.h @@ -37,11 +37,10 @@ #include "ue2common.h" #include "util/alloc.h" +#include "util/noncopyable.h" #include -#include - 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(); diff --git a/src/som/slot_manager.h b/src/som/slot_manager.h index 971ea362..adccf99a 100644 --- a/src/som/slot_manager.h +++ b/src/som/slot_manager.h @@ -36,11 +36,11 @@ #include "ue2common.h" #include "nfagraph/ng_holder.h" #include "util/alloc.h" +#include "util/noncopyable.h" #include "util/ue2_containers.h" #include #include -#include 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(); diff --git a/src/util/boundary_reports.h b/src/util/boundary_reports.h index 7ad93ba1..b2bb1c9b 100644 --- a/src/util/boundary_reports.h +++ b/src/util/boundary_reports.h @@ -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: @@ -30,13 +30,13 @@ #define BOUNDARY_REPORTS_H #include "ue2common.h" +#include "util/noncopyable.h" #include -#include namespace ue2 { -struct BoundaryReports : boost::noncopyable { +struct BoundaryReports : noncopyable { std::set report_at_0; /* set of internal reports to fire * unconditionally at offset 0 */ std::set report_at_0_eod; /* set of internal reports to fire diff --git a/src/util/partitioned_set.h b/src/util/partitioned_set.h index 8f92a8b7..a9e4644d 100644 --- a/src/util/partitioned_set.h +++ b/src/util/partitioned_set.h @@ -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: @@ -30,13 +30,13 @@ #define PARTITIONED_SET_H #include "container.h" +#include "noncopyable.h" #include "ue2_containers.h" #include "ue2common.h" #include #include -#include #include namespace ue2 { @@ -53,7 +53,7 @@ static constexpr size_t INVALID_SUBSET = ~(size_t)0; */ template -class partitioned_set : boost::noncopyable { +class partitioned_set : noncopyable { public: class subset { public: diff --git a/src/util/queue_index_factory.h b/src/util/queue_index_factory.h index 1360beef..e8f7028e 100644 --- a/src/util/queue_index_factory.h +++ b/src/util/queue_index_factory.h @@ -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,12 +33,11 @@ #define UTIL_QUEUE_INDEX_FACTORY_H #include "ue2common.h" - -#include +#include "util/noncopyable.h" namespace ue2 { -class QueueIndexFactory : boost::noncopyable { +class QueueIndexFactory : noncopyable { public: QueueIndexFactory() : val(0) {} u32 get_queue() { return val++; } diff --git a/src/util/report_manager.h b/src/util/report_manager.h index 4b62e4b5..f76aff22 100644 --- a/src/util/report_manager.h +++ b/src/util/report_manager.h @@ -36,12 +36,12 @@ #include "ue2common.h" #include "util/compile_error.h" +#include "util/noncopyable.h" #include "util/report.h" #include #include #include -#include 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); diff --git a/src/util/ue2_graph.h b/src/util/ue2_graph.h index 7526cad5..138d7467 100644 --- a/src/util/ue2_graph.h +++ b/src/util/ue2_graph.h @@ -31,6 +31,7 @@ #include "ue2common.h" #include "util/graph_range.h" +#include "util/noncopyable.h" #include "util/operators.h" #include @@ -156,7 +157,7 @@ namespace ue2 { namespace graph_detail { -class graph_base : boost::noncopyable { +class graph_base : noncopyable { }; struct default_edge_property {