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

            Bug ID: 47217
           Summary: Error propagating the tru type of an expression:
                    "non-literal type 'auto' cannot be used in a constant
                    expression"
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

The following code

template <typename... B>
struct Sample {
    template <typename A>
    static constexpr auto bar = 0;
};

constexpr auto fail = Sample<>::template bar<int>;

Fails to compile with this error: "non-literal type 'auto' cannot be used in a
constant expression"

Looks like a bug to me (and this only happens in clang).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to