OSDN Git Service

* call.c (convert_class_to_reference): Binding an lvalue to an
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Aug 2009 02:26:42 +0000 (02:26 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Aug 2009 02:26:42 +0000 (02:26 +0000)
commitaaa6e1c2fb96586f142e1f9c053399872212910b
tree835681f433a68776c98b51aa17db749656db573d
parentc7f0e2f230deaaee9f00d7759280aec42b820c6d
* call.c (convert_class_to_reference): Binding an lvalue to an
rvalue reference is bad.  If the user-defined conversion is bad,
set bad_p before merging conversions.
(maybe_handle_ref_bind): Don't push down bad_p.
(reference_binding): Binding an lvalue to an rvalue reference is bad.
(convert_like_real): Give a helpful error about binding lvalue
to rvalue reference.
(reference_related_p): No longer static.
* typeck.c (build_typed_address): New.
(build_static_cast_1): Add static_cast from lvalue to &&.
* cp-tree.h: Adjust.

* include/bits/move.h (forward): Implement as in N2835.
(move): Implement as in N2831.
* include/std/istream (rvalue stream operator>>): New.
* include/std/ostream (rvalue stream operator<<): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150327 138bc75d-0d04-0410-961f-82ee72b054a4
32 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/initlist22.C
gcc/testsuite/g++.dg/cpp0x/named.C
gcc/testsuite/g++.dg/cpp0x/overload.C
gcc/testsuite/g++.dg/cpp0x/overloadn.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/rv-cast.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/rv1n.C
gcc/testsuite/g++.dg/cpp0x/rv1p.C
gcc/testsuite/g++.dg/cpp0x/rv2n.C
gcc/testsuite/g++.dg/cpp0x/rv2p.C
gcc/testsuite/g++.dg/cpp0x/rv3n.C
gcc/testsuite/g++.dg/cpp0x/rv3p.C
gcc/testsuite/g++.dg/cpp0x/rv4n.C
gcc/testsuite/g++.dg/cpp0x/rv4p.C
gcc/testsuite/g++.dg/cpp0x/rv5n.C
gcc/testsuite/g++.dg/cpp0x/rv5p.C
gcc/testsuite/g++.dg/cpp0x/rv6n.C
gcc/testsuite/g++.dg/cpp0x/rv6p.C
gcc/testsuite/g++.dg/cpp0x/rv7n.C
gcc/testsuite/g++.dg/cpp0x/rv7p.C
gcc/testsuite/g++.dg/cpp0x/rv8p.C
gcc/testsuite/g++.dg/cpp0x/template_deduction.C
gcc/testsuite/g++.dg/cpp0x/unnamed_refs.C
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/move.h
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/ostream
libstdc++-v3/testsuite/27_io/rvalue_streams.cc [new file with mode: 0644]