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

            Bug ID: 44711
           Summary: __reference_binds_to_temporary is missing binding an
                    rvalue reference to a prvalue
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: barry.rev...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

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; }).

-- 
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

Reply via email to