[LLVMbugs] [Bug 19229] linker error passing const static field as template argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 22 14:37:38 PDT 2014


Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
(In reply to comment #0)
> template <class T, class U>
> bool operator!=(const T& LHS, const U& RHS) { return !(LHS == RHS); }
>   bool b2 = S != MyStr::ConstVal;

This is an odr-use of ConstVal, so you need to provide a definition of it.

> Why is not simply passed 1 here as well?

Because you're passing it by reference.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140322/ef2daac1/attachment.html>

More information about the llvm-bugs mailing list