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. Pick-to: 6.6 6.5 Task-number: QTBUG-104164 Change-Id: Ia4b43e4f819ce45d71274019c919fd98cc97878b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>bb10
parent
81d357ff8a
commit
51b9762685
|
|
@ -396,7 +396,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…
Reference in New Issue