aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/abstractmetalang.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-12 14:17:55 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-17 15:16:15 +0100
commit5fcbb17760d9ddf0a1e39c40baeaf28df9a4bb5e (patch)
tree3a59f0fda60e5b0cd671a0fc163772e6ab78582a /sources/shiboken6/ApiExtractor/abstractmetalang.h
parent1a53685c10dc3dab972a42fe02166ff0349320f4 (diff)
shiboken6: Improve detection of default/copy constructability
Add support for deleted functions. Extend the checks for default constructability by checks for fields and base classes. Refactor the check for copy constructability to recursively check on base classes. Remove functionality for adding private copy constructors which was apparently unused. Change-Id: I8105f277699d6121aa8aa193d9cb16bf8133e901 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetalang.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h
index e1e90863f..31a470667 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetalang.h
+++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h
@@ -78,7 +78,7 @@ public:
bool hasPrivateCopyConstructor() const;
void addDefaultConstructor();
- void addDefaultCopyConstructor(bool isPrivate = false);
+ void addDefaultCopyConstructor();
bool hasNonPrivateConstructor() const;
void setHasNonPrivateConstructor(bool value);
@@ -86,6 +86,12 @@ public:
bool hasPrivateConstructor() const;
void setHasPrivateConstructor(bool value);
+ bool hasDeletedDefaultConstructor() const;
+ void setHasDeletedDefaultConstructor(bool value);
+
+ bool hasDeletedCopyConstructor() const;
+ void setHasDeletedCopyConstructor(bool value);
+
bool hasPrivateDestructor() const;
void setHasPrivateDestructor(bool value);
@@ -95,7 +101,13 @@ public:
bool hasVirtualDestructor() const;
void setHasVirtualDestructor(bool value);
- bool isConstructible() const;
+ bool isDefaultConstructible() const;
+ bool isImplicitlyDefaultConstructible() const;
+ bool canAddDefaultConstructor() const;
+
+ bool isCopyConstructible() const;
+ bool isImplicitlyCopyConstructible() const;
+ bool canAddDefaultCopyConstructor() const;
bool generateExceptionHandling() const;