[llvm-bugs] [Bug 44946] New: template template argument deduction fail due to the imaginary conflict

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 18 07:06:07 PST 2020


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

            Bug ID: 44946
           Summary: template template argument deduction fail due to the
                    imaginary conflict
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vopl at bk.ru
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

enum class Enum {null};

template <Enum e> struct Pattern {};
template <int i> struct Breaker {};

struct Derived
    : Pattern<Enum::null>
    , Breaker<220> // <--------- this must not mades a collision with Pattern
because int is not a Enum
{};

template <template <Enum e> class P, Enum e> // here is Enum, int must not be
accepted
void matcher(P<e>);

int main()
{
    matcher(Derived{});//'matcher' candidate ignored: failed template argument
deduction
    return 0;
}

//affected versions: 8,9,10,11

-- 
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/20200218/bc348011/attachment.html>


More information about the llvm-bugs mailing list