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

            Bug ID: 37866
           Summary: no matching function for call
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: zhong...@pku.org.cn
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

The code sample is as follow:

enum { E = 2 };
template <bool> void f(int) {}
template <int> void f() {}

int
main ()
{
 f<1 * 1>();
 f<1 << 1>();
 f<1 ? 3 : 2>();
 f<E>();

 f<1 * 1>(0);
 f<1 << 1>(0);
 f<1 ? 3 : 2>(0);
 f<E>(0);
}

clang++ rejects it with error messages:
error: no matching function for call to 'f'
     f<1 << 1>(0);
error: no matching function for call to 'f'
     f<1 ? 3 : 2>(0);

The code comes from the test suite of gcc
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79184)

Is this a bug in clang++ or in the test suite of gcc?

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

Reply via email to