Boost logo

Boost :

Subject: Re: [boost] Old style casts and Boost style guidelines
From: David Abrahams (dave_at_[hidden])
Date: 2008-09-16 02:13:18


On Mon, 15 Sep 2008 21:01:48 -0400, Stefan Seefeld <seefeld_at_[hidden]>
wrote:
> Peter Dimov wrote:
>>
>> In this case, though, the meaning is unambiguous. (Y*)0 is - obviously
>> - a null pointer "literal" of type Y*. So it's nice. :-)
>
> It's a pitty that function-style casts are invalid here, since pointers
> don't have constructors. :-)

I don't think that's the reason; this is valid:

  typedef int* intp;
  intp x = intp();

-- 
David Abrahams
Boostpro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk