[llvm-commits] [llvm] r41378 - in /llvm/trunk: include/llvm/ADT/APFloat.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Support/APFloat.cpp lib/VMCore/Constants.cpp

Dale Johannesen dalej at apple.com
Fri Aug 24 16:47:05 PDT 2007


On Aug 24, 2007, at 4:40 PM, Chris Lattner wrote:
>>> I think that you can just remove this and the compiler will give you
>>> a compile-time error if you try to use it.  If you define it like
>>> this, you just get a link-time error.
>>
>> Yep, and the linker error message doesn't tell you where the
>> reference is coming from (I'm speaking from experience).  I mostly
>> did it this way because I see about 40 other places it was done this
>> way, and I  do see the utility as a statement of intent.  Why is this
>> one different?
>
> The difference here is that C++ compilers automatically synthesis
> copy ctors and default ctors and operator=, but they don't do the
> same for operator==.  To disable these automatically generated
> members, you have to "define" them, and put them in the private part
> of the class (so any users will get compile-time access violation
> errors as well as link errors).

Still learning that language.  OK then, I'll comment  it out.




More information about the llvm-commits mailing list