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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes