[cfe-dev] Smart pointers for canonical types

Douglas Gregor dgregor at apple.com
Tue Aug 4 22:52:40 PDT 2009


On Jul 18, 2009, at 3:04 AM, Sebastian Redl wrote:

> Douglas Gregor wrote:
>>
>> On Jul 15, 2009, at 4:58 PM, Douglas Gregor wrote:
>>> The attached patch introduces a new class template CanQual<T>, which
>>> is a smart pointer that refers to a canonical type whose dynamic  
>>> type
>>> is T or some subclass thereof. T will often be Type, but we also
>>> expect that, e.g., CanQual<PointerType> will be used rather than
>>> const PointerType*.
>>
>> Here's an updated patch, which contains all of the canonical type
>> proxies and converts the template argument deduction code over to use
>> the canonical-type smart pointer. Unless there are complaints, I plan
>> to introduce this code early next week.
> Looks very good. Just one nit: CanQual::getNonReferenceType has an
> incomplete comment.

Canonical types have finally been committed here:

	http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090803/020009.html

(With a follow-up commit to fix the incomplete comment Sebastian noted)

	- Doug



More information about the cfe-dev mailing list