Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

enum() as nullpointer

19 views
Skip to first unread message

Alf P. Steinbach

unread,
Dec 13, 2015, 2:03:35 AM12/13/15
to
Oh noes!

https://connect.microsoft.com/VisualStudio/feedback/details/2123005

void foo( void* ) {}

auto main() -> int
{
enum class X {};
foo( X() );
}

Please don't tell me that the standard allows this...

(It doesn't compile with g++, gooder beast!)

- Alf

Christian Gollwitzer

unread,
Dec 13, 2015, 2:14:13 AM12/13/15
to
Am 13.12.15 um 08:03 schrieb Alf P. Steinbach:
> Oh noes!
>
> https://connect.microsoft.com/VisualStudio/feedback/details/2123005
>
> void foo( void* ) {}
>
> auto main() -> int
> {
> enum class X {};
> foo( X() );
> }
>
> Please don't tell me that the standard allows this...

I do not see a nullptr - is it my vision? I see a void pointer.

Christian

Alf P. Steinbach

unread,
Dec 13, 2015, 2:47:37 AM12/13/15
to
"nullpointer" refers to value, not type.

Cheers & hth.,

- Alf


0 new messages