https://bugs.llvm.org/show_bug.cgi?id=40989
Richard Smith <richard-l...@metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> ---
The problem is that the recursive call happens here:
typename std::enable_if<!std::is_same<T, two>::value, decltype(rhs +
lhs)>::type
^~~~~~~~~
whereas the SFINAEable error happens later, here:
typename std::enable_if<!std::is_same<T, two>::value, decltype(rhs +
lhs)>::type
^~~~~~
... so this doesn't work. You need the SFINAE check to precede the computation
of the decltype type. I've written up an example of how to do that in PR40988.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs