[llvm-bugs] [Bug 45782] New: Unused arguments in alias template specialisation are not treated as substitution failure
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 3 02:42:57 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45782
Bug ID: 45782
Summary: Unused arguments in alias template specialisation are
not treated as substitution failure
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: v at vsamko.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
template<typename... T>
using void_t = void;
template<typename T, typename=void>
struct has_reflect_members {};
template<typename T>
struct has_reflect_members<T, void_t<typename T::mytype>> {};
template<typename T>
struct has_reflect_members<T, void_t<typename T::anothertype>> {};
results in
<source>:9:8: error: redefinition of 'has_reflect_members<T, void_t<typename
T::anothertype> >'
struct has_reflect_members<T, void_t<typename T::anothertype>> {};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<source>:7:8: note: previous definition is here
struct has_reflect_members<T, void_t<typename T::mytype>> {};
But according to http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558
these specialisations can rely on substitution failure and they wouldn't be
redefinitions.
--
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/20200503/1ebca5df/attachment.html>
More information about the llvm-bugs
mailing list