[LLVMbugs] [Bug 13433] New: incomplete return type for trailing-return-type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 22 22:22:47 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13433

             Bug #: 13433
           Summary: incomplete return type for trailing-return-type
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pichet2000 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


both gcc (4.6.3) and MSVC 11 (RC) accept the following code:

==============
template <typename _Type> class task;
template <> class task<void>;

template<typename _Type>
task<_Type> _To_task(_Type t);
task<void> _To_task();

template <typename _Function> auto _VoidReturnTypeHelper(_Function _Func, int,
int) ->  decltype(_Func(_To_task()));
===============

clang fails with 
test.cpp:9:104: error: calling '_To_task' with incomplete return type
      'task<void>'
  ..._Func, int, int) ->  decltype(_Func(_To_task()));


I honestly don't know if clang is right here.
This prevent clang to parse some msvc 11 header files.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list