Topic: More nullptr overloading
Author: Magnus F <magfr@lysator.liu.se>
Date: Sat, 27 Feb 2010 20:38:21 CST Raw View
I have been reading more of the nullptr proposal and the DR's.
At the moment it seems as if the following call to f is ambiguous:
void f(std::nullptr_t);
void f(char*);
void g() { f(0); }
I would have expected the nullptr_t overload to be better just like it
is trivially better in
void g2() { f(nullptr); }
/MF
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Magnus F <magfr@lysator.liu.se>
Date: Wed, 3 Mar 2010 11:02:15 CST Raw View
I suppose I failed to ask any questions below so I'll try again:
On Feb 28, 3:38 am, Magnus F <ma...@lysator.liu.se> wrote:
> I have been reading more of the nullptr proposal and the DR's.
>
> At the moment it seems as if the following call to f is ambiguous:
>
> void f(std::nullptr_t);
> void f(char*);
>
> void g() { f(0); }
Is my reading correct so that this should be ambiguous?
If so, why?
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]