[llvm-bugs] [Bug 44674] SFINAE leaks through requires expression requirement

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 27 21:13:46 PST 2020


Christopher Di Bella <cjdb.ns at gmail.com> changed:

           What    |Removed                     |Added
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #2 from Christopher Di Bella <cjdb.ns at gmail.com> ---
I'm not convinced that this issue and your example are equivalent (although
it's very possible that I have misdiagnosed this as a SFINAE issue when it is
not). The call to `std::to_address` is ill-formed: this means that
`passing<iterator>` should evaluate as `false`, rather than result in an
instantiation error.

template<typename I>
void foo(I i) requires requires { std::to_address(i); }

template<typename I>
concept passing = requires(I const& i) {

static_assert(not passing<iterator>);

I believe this is a faithful remodelling of your example, and still results in
an instantiation error.

Am I missing something here? The "minimal" repro works in cf25e7f, so I thought
this might be a regression.

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/20200128/941f26ea/attachment-0001.html>

More information about the llvm-bugs mailing list