[llvm-bugs] [Bug 47217] New: Error propagating the tru type of an expression: "non-literal type 'auto' cannot be used in a constant expression"
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 18 01:19:06 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: __alex8 at ukr.net
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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200818/d60b98ee/attachment.html>
More information about the llvm-bugs
mailing list