r174242 - This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard

John McCall rjmccall at apple.com
Fri Feb 1 16:44:45 PST 2013


On Feb 1, 2013, at 4:30 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Fri, Feb 1, 2013 at 4:25 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
>> Author: nicholas
>> Date: Fri Feb  1 18:25:55 2013
>> New Revision: 174242
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=174242&view=rev
>> Log:
>> This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
>> says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.

Why is this specific to *pure* virtual functions?  Shouldn't it be
*any* virtual function?

I mean, non-pure virtual functions are universally ODR-used anyway,
but there's no plausible implementation model in which &Cls::vfn
specifically requires a reference to the function.

John.



More information about the cfe-commits mailing list