aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/lib
diff options
context:
space:
mode:
authorArtemiy Volkov <artemiyv@acm.org>2017-03-20 13:47:57 -0700
committerKeith Seitz <keiths@redhat.com>2017-03-20 13:47:57 -0700
commit15c0a2a9305648095f5586a02b5a5017e1643e99 (patch)
treebbe3190a2152bb46e3f3412041b226a1e0c1c23f /gdb/guile/lib
parentaa0061181ab00081e9907447561e589d6edee9f2 (diff)
downloadgdb-15c0a2a9305648095f5586a02b5a5017e1643e99.zip
gdb-15c0a2a9305648095f5586a02b5a5017e1643e99.tar.gz
gdb-15c0a2a9305648095f5586a02b5a5017e1643e99.tar.bz2
Add rvalue references to overloading resolution
This patch introduces changes to rank_one_type() dealing with ranking an rvalue reference type when selecting a best viable function from a set of candidate functions. The 4 new added rules for rvalue references are: 1) An rvalue argument cannot be bound to a non-const lvalue reference parameter and an lvalue argument cannot be bound to an rvalue reference parameter. [C++11 13.3.3.1.4p3] 2) If a conversion to one type of reference is an identity conversion, and a conversion to the second type of reference is a non-identity conversion, choose the first type. [C++11 13.3.3.2p3] 3) An rvalue should be first tried to bind to an rvalue reference, and then to an lvalue reference. [C++11 13.3.3.2p3] 4) An lvalue reference to a function gets higher priority than an rvalue reference to a function. [C++11 13.3.3.2p3] This patch is not exactly correct. See c++/15372 for tracking overload resolution bugs. gdb/ChangeLog PR gdb/14441 * gdbtypes.c (rank_one_type): Implement overloading resolution rules regarding rvalue references.
Diffstat (limited to 'gdb/guile/lib')
0 files changed, 0 insertions, 0 deletions