QSharedPointer: mark create() [[nodiscard]]
It's a named constructor of a smart pointer class. QUIP-0019 says constructors of such classes should be marked as [[noexcept]]. It doesn't (yet) say anything about _named_ constructors, but it makes sense to include them, too. Task-number: QTBUG-104164 Change-Id: Ia4b43e4f819ce45d71274019c919fd98cc97878b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 51b97626857f13e785aae61c1beb16dc39601cd2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1a6e1660b1
commit
76a051047e
@ -386,7 +386,7 @@ public:
|
||||
[[nodiscard]] QWeakPointer<T> toWeakRef() const;
|
||||
|
||||
template <typename... Args>
|
||||
static QSharedPointer create(Args && ...arguments)
|
||||
[[nodiscard]] static QSharedPointer create(Args && ...arguments)
|
||||
{
|
||||
typedef QtSharedPointer::ExternalRefCountWithContiguousData<T> Private;
|
||||
# ifdef QT_SHAREDPOINTER_TRACK_POINTERS
|
||||
|
Loading…
x
Reference in New Issue
Block a user