Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52569

Can't assign a nullptr to a QSharedPointer<T>

XMLWordPrintable

      shptr.cpp:6:27: error: conversion from ‘std::nullptr_t’ to non-scalar type ‘QSharedPointer<int>’ requested                                                                                                                                 
         QSharedPointer<int> p = nullptr; 
      

      This is a not-uncommon thing to do with a std::shared_ptr.

      I didn't look for other incompatibilities. I just noticed this one when porting one use of std::shared_ptr to QSharedPointer.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            steveire Stephen Kelly (Personal)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes