[llvm-bugs] [Bug 43459] New: templated constexpr constant in a template fails to deduce auto type

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 26 02:23:11 PDT 2019


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

            Bug ID: 43459
           Summary: templated constexpr constant in a template fails to
                    deduce auto type
           Product: clang
           Version: 9.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arbmind at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following code compiled on clang 8 and is now wrong in clang 9.

See: https://godbolt.org/z/WdLl4c

template<class>
struct Template {
    template<typename>
    static constexpr auto type_v = 0;
};

using T = Template<int>;
static_assert(T::type_v<int> == 0);


error: invalid operands to binary expression ('const auto' and 'int')

It seems the 'const auto' was never resolved to the real type.

-- 
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/20190926/8d6c4d1a/attachment.html>


More information about the llvm-bugs mailing list