mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Work around for deficiency in C++11/14/17 standard
As explained to us by STL at Microsoft (the author of their vector), there is a hole in the standard wrt the vector copy constructor, which always exists even if it won't compile.
This commit is contained in:
parent
68bdc800fc
commit
bc2f336d9d
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2016, Intel Corporation
|
* Copyright (c) 2015-2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -248,6 +248,30 @@ struct build_context : boost::noncopyable {
|
|||||||
rose_group squashable_groups = 0;
|
rose_group squashable_groups = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** \brief subengine info including built engine and
|
||||||
|
* corresponding triggering rose vertices */
|
||||||
|
struct ExclusiveSubengine {
|
||||||
|
aligned_unique_ptr<NFA> nfa;
|
||||||
|
vector<RoseVertex> vertices;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** \brief exclusive info to build tamarama */
|
||||||
|
struct ExclusiveInfo {
|
||||||
|
// subengine info
|
||||||
|
vector<ExclusiveSubengine> subengines;
|
||||||
|
// all the report in tamarama
|
||||||
|
set<ReportID> reports;
|
||||||
|
// assigned queue id
|
||||||
|
u32 queue;
|
||||||
|
|
||||||
|
// workaround a deficiency in the standard (as explained by STL @ MS) we
|
||||||
|
// need to tell the compiler that ExclusiveInfo is moveable-only by
|
||||||
|
// deleting the copy cons so that vector doesn't get confused
|
||||||
|
ExclusiveInfo() = default;
|
||||||
|
ExclusiveInfo(const ExclusiveInfo &) = delete;
|
||||||
|
ExclusiveInfo(ExclusiveInfo &&) = default;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Intel Corporation
|
* Copyright (c) 2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -49,23 +49,6 @@
|
|||||||
|
|
||||||
namespace ue2 {
|
namespace ue2 {
|
||||||
|
|
||||||
/** brief subengine info including built engine and
|
|
||||||
* corresponding triggering rose vertices */
|
|
||||||
struct ExclusiveSubengine {
|
|
||||||
aligned_unique_ptr<NFA> nfa;
|
|
||||||
std::vector<RoseVertex> vertices;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** \brief exclusive info to build tamarama */
|
|
||||||
struct ExclusiveInfo {
|
|
||||||
// subengine info
|
|
||||||
std::vector<ExclusiveSubengine> subengines;
|
|
||||||
// all the report in tamarama
|
|
||||||
std::set<ReportID> reports;
|
|
||||||
// assigned queue id
|
|
||||||
u32 queue;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** \brief role info structure for exclusive analysis */
|
/** \brief role info structure for exclusive analysis */
|
||||||
template<typename role_id>
|
template<typename role_id>
|
||||||
struct RoleInfo {
|
struct RoleInfo {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user