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 {
|
class VerilatedModule {
|
||||||
private:
|
private:
|
||||||
const char* m_namep; ///< Module name
|
const char* m_namep; ///< Module name
|
||||||
VerilatedModule(); ///< N/A, always use named constructor below
|
VerilatedModule() VL_EQ_DELETE; ///< N/A, always use named constructor below
|
||||||
VerilatedModule(const VerilatedModule& ); ///< N/A, no copy constructor
|
VerilatedModule(const VerilatedModule& ) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||||
public:
|
public:
|
||||||
explicit VerilatedModule(const char* namep); ///< Create module with given hierarchy name
|
explicit VerilatedModule(const char* namep); ///< Create module with given hierarchy name
|
||||||
~VerilatedModule();
|
~VerilatedModule();
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public:
|
||||||
return *this; // For function chaining
|
return *this; // For function chaining
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
VerilatedSerialize(const VerilatedSerialize& ); ///< N/A, no copy constructor
|
VerilatedSerialize(const VerilatedSerialize&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||||
VerilatedSerialize& bufferCheck() {
|
VerilatedSerialize& bufferCheck() {
|
||||||
// Flush the write buffer if there's not enough space left for new information
|
// 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
|
// 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 (const void* __restrict datap, size_t size);
|
||||||
VerilatedDeserialize& readAssert (vluint64_t data) { return readAssert(&data, sizeof(data)); }
|
VerilatedDeserialize& readAssert (vluint64_t data) { return readAssert(&data, sizeof(data)); }
|
||||||
private:
|
private:
|
||||||
VerilatedDeserialize(const VerilatedDeserialize& ); ///< N/A, no copy constructor
|
VerilatedDeserialize(const VerilatedDeserialize&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||||
VerilatedDeserialize& bufferCheck() {
|
VerilatedDeserialize& bufferCheck() {
|
||||||
// Flush the write buffer if there's not enough space left for new information
|
// 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
|
// 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);
|
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:
|
protected:
|
||||||
// METHODS
|
// METHODS
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@
|
||||||
// C++-2011
|
// C++-2011
|
||||||
|
|
||||||
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
|
# define VL_EQ_DELETE = delete
|
||||||
# define VL_HAS_UNIQUE_PTR
|
# define VL_HAS_UNIQUE_PTR
|
||||||
# define VL_HAS_UNORDERED_MAP
|
# define VL_HAS_UNORDERED_MAP
|
||||||
# define VL_HAS_UNORDERED_SET
|
# define VL_HAS_UNORDERED_SET
|
||||||
|
|
@ -118,6 +119,7 @@
|
||||||
# define VL_INCLUDE_UNORDERED_MAP <unordered_map>
|
# define VL_INCLUDE_UNORDERED_MAP <unordered_map>
|
||||||
# define VL_INCLUDE_UNORDERED_SET <unordered_set>
|
# define VL_INCLUDE_UNORDERED_SET <unordered_set>
|
||||||
#else
|
#else
|
||||||
|
# define VL_EQ_DELETE
|
||||||
# define vl_unique_ptr std::auto_ptr
|
# define vl_unique_ptr std::auto_ptr
|
||||||
# define vl_unordered_map std::map
|
# define vl_unordered_map std::map
|
||||||
# define vl_unordered_set std::set
|
# define vl_unordered_set std::set
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public:
|
||||||
}
|
}
|
||||||
~V3CCtorsVisitor() {}
|
~V3CCtorsVisitor() {}
|
||||||
private:
|
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 {
|
class V3InFilter {
|
||||||
V3InFilterImp* m_impp;
|
V3InFilterImp* m_impp;
|
||||||
V3InFilter(const V3InFilter&); ///< N/A, no copy constructor
|
V3InFilter(const V3InFilter&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||||
public:
|
public:
|
||||||
// TYPES
|
// TYPES
|
||||||
typedef list<string> StrList;
|
typedef list<string> StrList;
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ class V3Options {
|
||||||
bool parseLangExt(const char* swp, const char* langswp, const V3LangCode& lc);
|
bool parseLangExt(const char* swp, const char* langswp, const V3LangCode& lc);
|
||||||
string filePathCheckOneDir(const string& modname, const string& dirname);
|
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:
|
public:
|
||||||
// CREATORS
|
// CREATORS
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class V3Parse {
|
||||||
private:
|
private:
|
||||||
V3ParseImp* m_impp;
|
V3ParseImp* m_impp;
|
||||||
|
|
||||||
V3Parse(const V3Parse&); ///< N/A, no copy constructor
|
V3Parse(const V3Parse&) VL_EQ_DELETE; ///< N/A, no copy constructor
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
// We must allow reading multiple files into one parser
|
// We must allow reading multiple files into one parser
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ private:
|
||||||
VSymEnt* m_symRootp; // Root symbol table
|
VSymEnt* m_symRootp; // Root symbol table
|
||||||
SymStack m_symsp; // All symbol tables, to cleanup
|
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:
|
protected:
|
||||||
friend class VSymEnt;
|
friend class VSymEnt;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue