mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Internals: Use = delete via a macro for a bit of C++11 forward compatibility
This commit is contained in:
parent
5ead61dc7b
commit
c17c81254e
@ -102,8 +102,8 @@ enum VerilatedVarFlags {
|
||||
class VerilatedModule {
|
||||
private:
|
||||
const char* m_namep; ///< Module name
|
||||
VerilatedModule(); ///< N/A, always use named constructor below
|
||||
VerilatedModule(const VerilatedModule& ); ///< N/A, no copy constructor
|
||||
VerilatedModule() VL_EQ_DELETE; ///< N/A, always use named constructor below
|
||||
VerilatedModule(const VerilatedModule& ) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
public:
|
||||
explicit VerilatedModule(const char* namep); ///< Create module with given hierarchy name
|
||||
~VerilatedModule();
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
return *this; // For function chaining
|
||||
}
|
||||
private:
|
||||
VerilatedSerialize(const VerilatedSerialize& ); ///< N/A, no copy constructor
|
||||
VerilatedSerialize(const VerilatedSerialize&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
VerilatedSerialize& bufferCheck() {
|
||||
// Flush the write buffer if there's not enough space left for new information
|
||||
// We only call this once per vector, so we need enough slop for a very wide "b###" line
|
||||
@ -134,7 +134,7 @@ public:
|
||||
VerilatedDeserialize& readAssert (const void* __restrict datap, size_t size);
|
||||
VerilatedDeserialize& readAssert (vluint64_t data) { return readAssert(&data, sizeof(data)); }
|
||||
private:
|
||||
VerilatedDeserialize(const VerilatedDeserialize& ); ///< N/A, no copy constructor
|
||||
VerilatedDeserialize(const VerilatedDeserialize&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
VerilatedDeserialize& bufferCheck() {
|
||||
// Flush the write buffer if there's not enough space left for new information
|
||||
// We only call this once per vector, so we need enough slop for a very wide "b###" line
|
||||
|
@ -143,7 +143,7 @@ private:
|
||||
return out + static_cast<char>((code)%94+33);
|
||||
}
|
||||
|
||||
VerilatedVcd(const VerilatedVcd& ); ///< N/A, no copy constructor
|
||||
VerilatedVcd(const VerilatedVcd&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
|
||||
protected:
|
||||
// METHODS
|
||||
|
@ -109,6 +109,7 @@
|
||||
// C++-2011
|
||||
|
||||
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define VL_EQ_DELETE = delete
|
||||
# define VL_HAS_UNIQUE_PTR
|
||||
# define VL_HAS_UNORDERED_MAP
|
||||
# define VL_HAS_UNORDERED_SET
|
||||
@ -118,6 +119,7 @@
|
||||
# define VL_INCLUDE_UNORDERED_MAP <unordered_map>
|
||||
# define VL_INCLUDE_UNORDERED_SET <unordered_set>
|
||||
#else
|
||||
# define VL_EQ_DELETE
|
||||
# define vl_unique_ptr std::auto_ptr
|
||||
# define vl_unordered_map std::map
|
||||
# define vl_unordered_set std::set
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
}
|
||||
~V3CCtorsVisitor() {}
|
||||
private:
|
||||
explicit V3CCtorsVisitor(const V3CCtorsVisitor&); ///< N/A, no copy constructor
|
||||
explicit V3CCtorsVisitor(const V3CCtorsVisitor&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -77,7 +77,7 @@ class V3InFilterImp;
|
||||
|
||||
class V3InFilter {
|
||||
V3InFilterImp* m_impp;
|
||||
V3InFilter(const V3InFilter&); ///< N/A, no copy constructor
|
||||
V3InFilter(const V3InFilter&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
public:
|
||||
// TYPES
|
||||
typedef list<string> StrList;
|
||||
|
@ -180,7 +180,7 @@ class V3Options {
|
||||
bool parseLangExt(const char* swp, const char* langswp, const V3LangCode& lc);
|
||||
string filePathCheckOneDir(const string& modname, const string& dirname);
|
||||
|
||||
V3Options(const V3Options&); ///< N/A, no copy constructor
|
||||
V3Options(const V3Options&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
|
||||
public:
|
||||
// CREATORS
|
||||
|
@ -36,7 +36,7 @@ class V3Parse {
|
||||
private:
|
||||
V3ParseImp* m_impp;
|
||||
|
||||
V3Parse(const V3Parse&); ///< N/A, no copy constructor
|
||||
V3Parse(const V3Parse&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
// We must allow reading multiple files into one parser
|
||||
|
@ -250,7 +250,7 @@ private:
|
||||
VSymEnt* m_symRootp; // Root symbol table
|
||||
SymStack m_symsp; // All symbol tables, to cleanup
|
||||
|
||||
VSymGraph(const VSymGraph&); ///< N/A, no copy constructor
|
||||
VSymGraph(const VSymGraph&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||
|
||||
protected:
|
||||
friend class VSymEnt;
|
||||
|
Loading…
Reference in New Issue
Block a user