[cfe-dev] error: cannot initialize a variable of type 'NSBitmapImageFileType' with an rvalue of type 'nullptr_t'
Richard Smith
richard at metafoo.co.uk
Mon Apr 20 15:41:09 PDT 2015
On Mon, Apr 20, 2015 at 3:01 PM, Jack Howarth <
howarth.mailing.lists at gmail.com> wrote:
> I am running into an error in clang 3.6.0svn with the line...
>
> NSBitmapImageFileType imageFileType = nil;
>
> producing an error of...
>
> /sw/src/fink.build/rstudio-desktop-0.98.1103-4/rstudio-0.98.1103/src/cpp/desktop-mac/GwtCallbacks.mm:609:26:
> error: cannot initialize a variable of type 'NSBitmapImageFileType' with an
> rvalue of type 'nullptr_t'
> NSBitmapImageFileType imageFileType = nil;
> ^ ~~~
>
> when -std=c++11 is used. Is this an glitch in the compiler? According to...
>
>
> http://www.cprogramming.com/c++11/c++11-nullptr-strongly-typed-enum-class.html
>
> shouldn't I I be able to initialize it with std::nullptr_t?
>
As far as I can tell, NSBitmapImageFileType is an enum. So no.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150420/18d200c0/attachment.html>
More information about the cfe-dev
mailing list