diff options
author | David Shah <dave@ds0.me> | 2020-11-13 20:19:53 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-11-13 20:19:53 +0000 |
commit | 8686b6dada11881e6f75cff48dd74dad18835d42 (patch) | |
tree | 1534a3662bfebe58f9afa4c7c43bd3008b69845a | |
parent | 319046fed73967004611213188098d3364faa5f2 (diff) | |
download | nextpnr-8686b6dada11881e6f75cff48dd74dad18835d42.tar.gz nextpnr-8686b6dada11881e6f75cff48dd74dad18835d42.tar.bz2 nextpnr-8686b6dada11881e6f75cff48dd74dad18835d42.zip |
RelPtr: remove copy constructor and copy assignment
These operations are meaningless for a data structure that references
another structure relative to its location.
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | ecp5/arch.h | 3 | ||||
-rw-r--r-- | ice40/arch.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h index ecf653fc..32dc31d6 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -45,6 +45,9 @@ template <typename T> struct RelPtr const T &operator*() const { return *(get()); } const T *operator->() const { return get(); } + + RelPtr(const RelPtr &) = delete; + RelPtr &operator=(const RelPtr &) = delete; }; NPNR_PACKED_STRUCT(struct BelWirePOD { diff --git a/ice40/arch.h b/ice40/arch.h index 02519252..1274a52a 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -41,6 +41,9 @@ template <typename T> struct RelPtr const T &operator*() const { return *(get()); } const T *operator->() const { return get(); } + + RelPtr(const RelPtr &) = delete; + RelPtr &operator=(const RelPtr &) = delete; }; NPNR_PACKED_STRUCT(struct BelWirePOD { |