[llvm-bugs] [Bug 44175] unused member variable causes code to compile for member to function for undefined function

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 3 07:39:04 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44175

David Blaikie <dblaikie at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #2 from David Blaikie <dblaikie at gmail.com> ---
Yeah, I'm going to resolve this as invalid - seems GCC and Clang both accept
the code, and it boils down to something like this:

struct Bad {  };

template <typename T>
struct is_Foo {
    void (T::*hello)(int) = &T::hello;
    constexpr static bool value=true;
};

int main() {
    return is_Foo<Bad>::value;
}

- instantiating the class and the static member 'value', doesn't instantiate
the non-static members.

-- 
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/20191203/aac443af/attachment.html>


More information about the llvm-bugs mailing list