]> granicus.if.org Git - clang/commit
Speculatively implement a tweak to the C++0x overload resolution rules
authorDouglas Gregor <dgregor@apple.com>
Tue, 25 Jan 2011 22:19:32 +0000 (22:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 25 Jan 2011 22:19:32 +0000 (22:19 +0000)
commitb7cd135215501a154eb4f68159f3af020783099e
treecd4aeb8fee036232da018d785d8f35988754b416
parent2bc212120692987b02ae8a85366a58f1c36cc2bf
Speculatively implement a tweak to the C++0x overload resolution rules
for reference binding (C++ [over.rank.ics]p3b1sb4), so that we prefer
the binding of an lvalue reference to a function lvalue over the
binding of an rvalue reference. This change resolves the ambiguity
with std::forward and lvalue references to function types in a way
that seems consistent with the original rvalue references proposal.

My proposed wording for this change is shown in
isBetterReferenceBindingKind(); we'll try to get this change adopted
in the C++0x working paper as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124236 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Overload.h
lib/Sema/SemaOverload.cpp
test/CXX/over/over.match/over.match.best/over.ics.rank/p3-0x.cpp