bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnulib and nullptr


From: Jeffrey Walton
Subject: Re: Gnulib and nullptr
Date: Mon, 6 Feb 2023 16:22:46 -0500

On Sun, Feb 5, 2023 at 9:45 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> On 2023-02-05 18:00, Bruno Haible wrote:
> > Why call it 'c-nullptr', not 'nullptr'?
>
> I was worried about C++, not that I know much about it, and operated by
> analogy with the name of m4/c-bool.m4. If 'nullptr' is a better name
> then let's switch to it. I assume we'd also switch the file names, the
> macro names, etc.

In C++, nullptr is not convertible to an integral. So this no longer
causes confusion:

    g(void*);
    g(int);

g(nullptr) will always match g(void*). g(int) will never be matched,
which could happen with g(NULL).

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]