Open
Description
Bugzilla Link | 44711 |
Version | trunk |
OS | Windows NT |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor,@zygoloid |
Extended Description
This:
static_assert(__reference_binds_to_temporary(int&&, int));
Fails, the implementation doesn't consider this to be a reference binding to a temporary (the implementation is in terms of isDirectReferenceBinding
).
While this particular case isn't important for std::tuple
(where we'll have already materialized the temporary on the constructor boundary, so the right-hand side would be int&&
already), it is important for the INVOKE<R>
machinery -- where we might want to reject std::function<int&&()>([]{ return 42; })
.