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

            Bug ID: 42454
           Summary: The std::function call throws std::exception for
                    unclear reason
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Created attachment 22171
  --> https://bugs.llvm.org/attachment.cgi?id=22171&action=edit
testcase-std::function.cpp

The attached testcase calls std::function<void(const std::string&)> twice.

The second invocation throws std::exception when compiled with .

When it is compiled with gcc8 it throws bad_function_call.

It's not clear why should any exception be thrown at all. Why can't it call the
same function again from the lambda function?

FreeBSD 12. Tried clang8, clang7, clang6.

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

Reply via email to