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

            Bug ID: 52368
           Summary: Class template argument deduction fails in case of
                    function type argument
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: fchelno...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

In the following program Clang is unable to perform class template argument
deduction:
```
template<typename T>
struct A{
    A(T f()){ f(); }
};

int foo() { return 1; }

int main() {
    [[maybe_unused]] A y = foo; // Clang error
}
```
GCC accepts it successfully, demo: https://gcc.godbolt.org/z/PKe6T5aW5

Related discussion: https://stackoverflow.com/q/69778510/7325599

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

Reply via email to