[LLVMbugs] [Bug 22710] New: Valid return type deduction for lambda functions not valid in C++14

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 26 07:33:34 PST 2015


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

            Bug ID: 22710
           Summary: Valid return type deduction for lambda functions not
                    valid in C++14
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lvoufo at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang accepts the following in C++11 mode, but not in C++14 mode.

$ cat a.cpp
struct C {
  void test() {
    auto in = +[](decltype(this) t) { return true;};
  }
};
$
$ clang++ -std=c++1y fileB.cpp -c
fileB.cpp:83:14: error: cannot deduce return type 'bool (*)(decltype(this))'
from returned value of type 'bool (decltype(this))'
  auto in = +[](decltype(this) t) { return true;};
             ^
1 error generated.
$

-- 
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/20150226/e1323b8f/attachment.html>


More information about the llvm-bugs mailing list