[llvm-bugs] [Bug 46551] New: Template deduction fails when deduction partially disabled
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 2 00:47:16 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46551
Bug ID: 46551
Summary: Template deduction fails when deduction partially
disabled
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: kaba at hilvi.org
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The following does not compile. Gcc 10.1 compiles successfully.
#include <type_traits>
template <typename T, int N = -1>
struct Span {
Span() {}
Span(const Span<std::remove_cvref_t<T>, N>&) {}
};
template <typename T, int N>
void f(Span<std::type_identity_t<const T>, N> a, T b) {}
int main()
{
f(Span<int>(), 1);
}
--
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/20200702/f7066fae/attachment.html>
More information about the llvm-bugs
mailing list