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

            Bug ID: 23554
           Summary: clang incorrectly detects a circular template
                    recursion where there is none
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 14335
  --> https://llvm.org/bugs/attachment.cgi?id=14335&action=edit
File containing code causing the problem

In the attached code clang seems to to be trying to resolve a template
recursion where there is actually none in line 12 (the return type declaration
using decltype). With MSVC12 (2013) and gcc4.9 the same code compiles without
any errors or warnings.

Workaround: Replacing the explicit decltype declaration with C++14's
decltype(auto) results in compilation without errors.

I tested this with clang3.6 on OSX and the 3.7 trunk version on Windows in MSVC
emulation mode with the same outcome.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to