[llvm-bugs] [Bug 41896] Bogus "error: no return statement in constexpr function" when void return type is "templated"
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 17 01:55:35 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41896
Stephan Bergmann <stephan.bergmann.secondary at googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Stephan Bergmann <stephan.bergmann.secondary at googlemail.com> ---
(In reply to Eli Friedman from comment #2)
> Oh, right... "std::enable_if<true, void>" isn't void, it's a class type. So
> clang is doing the right thing for your testcase: g() can't be called in a
> constexpr context.
Oops, right, I had started from a wrongly reduced test case (I should have used
std::enable_if_t instead of std::enable_if) and then drew wrong conclusions.
(See <https://gcc.gnu.org/ml/libstdc++/2019-05/msg00151.html> "Re: [PATCH]
Define std::__invoke_r for INVOKE<R>" for details.)
--
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/20190517/b4f7723a/attachment.html>
More information about the llvm-bugs
mailing list