summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-23 21:10:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-23 17:51:45 +0100
commit7ee9551b62b050f7e9aefdc19e19bac5ba263507 (patch)
tree4b65eee1e0b83e1c2eeb8a40dad685f6709e7001 /src/corelib/tools/qsharedpointer.h
parentf4b4b4414e202fb2873579ed3f50aa9e20710c02 (diff)
Add support for multiple arguments to QSharedPointer::create()
Requires C++11 rvalue references and variadic templates so we can implement perfect forwarding. Change-Id: I62e47d1ffd0c61e8386f9f246aa79031b7430b46 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qsharedpointer.h')
-rw-r--r--src/corelib/tools/qsharedpointer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h
index cfc5cadbb0..a430153bca 100644
--- a/src/corelib/tools/qsharedpointer.h
+++ b/src/corelib/tools/qsharedpointer.h
@@ -95,6 +95,9 @@ public:
template <class X> QSharedPointer<X> dynamicCast() const;
template <class X> QSharedPointer<X> constCast() const;
template <class X> QSharedPointer<X> objectCast() const;
+
+ static inline QSharedPointer<T> create();
+ static inline QSharedPointer<T> create(...);
};
template <class T>